Skip to content

Instantly share code, notes, and snippets.

@p-chin
Created September 3, 2013 23:22
Show Gist options
  • Save p-chin/6430924 to your computer and use it in GitHub Desktop.
Save p-chin/6430924 to your computer and use it in GitHub Desktop.
https://gist.github.com/p-chin/6098518 を使ったPlayerControllerクラス
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