Exemple #1
0
 // 판다가 맞는 애니메이션에 들어왔을 때 moveable = false. 맞고 있는 동안 이동을 하지 못 하게 위해서이다.
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     // 판다스크립트를 처음 지정하는 경우
     if (pandascript == null)
     {
         pandascript = animator.gameObject.GetComponent <PandaScript>();
     }
     pandascript.moveable = false;
 }
Exemple #2
0
 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;
     }
 }
Exemple #3
0
 public static void changeActivePanda(PandaScript ps)
 {
     activePanda = ps;
     if (activePanda != null)
     {
         Debug.Log(activePanda.pandaName + " active");
     }
     else
     {
         Debug.Log("No panda selected");
     }
 }
Exemple #4
0
 public void pandaHurting(PandaScript ps)
 {
     print(ps.pandaName + " is hurting");
 }
Exemple #5
0
 public void pandaThirsty(PandaScript ps)
 {
     print(ps.pandaName + " is thirsty");
 }
Exemple #6
0
 public void pandaHungry(PandaScript ps)
 {
     print(ps.pandaName + " is hungry");
 }
Exemple #7
0
 public static void pandaHurting(PandaScript ps)
 {
 }
Exemple #8
0
 public static void pandaThirsty(PandaScript ps)
 {
 }
Exemple #9
0
 public static void pandaHungry(PandaScript ps)
 {
 }