示例#1
0
 // Update is called once per frame
 void Update()
 {
     // disable chasing if target is facing the ghost
     if (chase.getTarget() == null || isTargetFacingMe())
     {
         stop();
         body.Sleep();
     }
     else
     {
         body.Activate();
         chase.enableChasing();
         fly.fly();
     }
 }