Skip to content

Instantly share code, notes, and snippets.

@kentouemura
Created March 14, 2016 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kentouemura/22feeaee01aa76e4f1e8 to your computer and use it in GitHub Desktop.
Save kentouemura/22feeaee01aa76e4f1e8 to your computer and use it in GitHub Desktop.
ゲームシーンクラス
using UnityEngine;
using System.Collections;
/// <summary>
/// ゲームシーンクラス
/// </summary>
public class GameScene : MonoBehaviour
{
[SerializeField] PlayerInputHandler playerInputHandler;
[SerializeField] Player player;
void Update()
{
PlayerCommand command = playerInputHandler.InputHandler();
// 行動したのであれば、インスペクターで指定したオブジェクトで実行する
if(command != null)
{
command.Execute(player);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment