// 판다가 맞는 애니메이션에 들어왔을 때 moveable = false. 맞고 있는 동안 이동을 하지 못 하게 위해서이다. override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { // 판다스크립트를 처음 지정하는 경우 if (pandascript == null) { pandascript = animator.gameObject.GetComponent <PandaScript>(); } pandascript.moveable = false; }
public static void worldPointClicked(Vector3 pos) { if (activePanda != null) { Vector3 target = new Vector3(pos.x, 0, pos.z); activePanda.GetComponent <NavMeshAgent>().SetDestination(target); activePanda = null; } }
public static void changeActivePanda(PandaScript ps) { activePanda = ps; if (activePanda != null) { Debug.Log(activePanda.pandaName + " active"); } else { Debug.Log("No panda selected"); } }
public void pandaHurting(PandaScript ps) { print(ps.pandaName + " is hurting"); }
public void pandaThirsty(PandaScript ps) { print(ps.pandaName + " is thirsty"); }
public void pandaHungry(PandaScript ps) { print(ps.pandaName + " is hungry"); }
public static void pandaHurting(PandaScript ps) { }
public static void pandaThirsty(PandaScript ps) { }
public static void pandaHungry(PandaScript ps) { }