﻿#pragma once

#include "DxGame/Rect.h"
#include "DxGame/Vector2.h"

namespace dxgame::shooting
{
    class Input;
    class ImageManager;

    // プレイヤーの中心座標と移動を管理する
    class Player
    {
    public:
        // プレイヤーを開始位置へ戻す
        void Reset();

        // 入力から移動方向を求めプレイヤーを画面内で移動させる
        // deltaTimeは移動計算で1フレーム分として使う秒数
        void Update(const Input& input, float deltaTime);

        // プレイヤー画像を表示用Rectに合わせて描く
        void Draw(const ImageManager& images) const;

        // 表示用Rectを現在位置へ移動して返す
        Rect GetDrawRect() const;

    private:
        // プレイヤーの中心座標
        Vector2 position = {};
    };
}
