Created
September 3, 2013 23:22
-
-
Save p-chin/6430924 to your computer and use it in GitHub Desktop.
https://gist.github.com/p-chin/6098518
を使ったPlayerControllerクラス
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; | |
public class PlayerController : BaseCharactorController { | |
void Update() { | |
ReceiveInput(); // player only | |
} | |
void FixedUpdate() { | |
Move(horizontal, vartical); | |
Jump(); | |
} | |
protected override void Init () | |
{ | |
} | |
/// <summary> | |
/// Calculates the hp. | |
/// </summary> | |
/// <param name="delta">The number which is health point is changed by, can be positive or negative</param> | |
public void calcHp(int delta) { | |
_hp += delta; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment