view Assets/Application/Scripts/CharactorManager.cs @ 3:2dd40b4412e4

Create game base.
author Kazuma
date Mon, 07 Nov 2016 18:42:01 +0900
parents e5ef0342d00b
children 2878be4487ec
line wrap: on
line source

using UnityEngine;
using System.Collections;

// Player Enemy どちらもここで制御する
public class CharactorManager : MonoBehaviour {
	
	// Use this for initialization
	void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {
		// Playerの制御
		PlayerController();
	}

	public void PlayerController () {
		Player.Instance.Move (Input.GetKey(KeyCode.S));
		Player.Instance.EyeMove (new Vector3 (InputManager.Instance.InputX, InputManager.Instance.InputZ, 0));
		if (Input.GetKeyDown (KeyCode.Space)) {
			Player.Instance.GetItem ();
		}

		if (Input.GetMouseButtonDown(1)) {
			Player.Instance.SetItem ();
		}
	}
}