プレイヤーの操作受け取りクラス
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
/// <summary> | |
/// プレイヤー操作クラス | |
/// </summary> | |
public class PlayerInputHandler : MonoBehaviour | |
{ | |
/// <summary> | |
/// 移動コマンド | |
/// </summary> | |
[SerializeField] | |
MoveCommand moveCommand; | |
/// <summary> | |
/// 操作 | |
/// </summary> | |
/// <returns>The handler.</returns> | |
public PlayerCommand InputHandler() | |
{ | |
if(Input.GetKey(KeyCode.RightArrow) || Input.GetKey(KeyCode.LeftArrow)) | |
return moveCommand; | |
return null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment