コード例 #1
0
 void Attack(AiController controller)
 {
     if (controller.CheckActionTimer(countDown))
     {
         //Debug.DrawRay(controller.transform.position, controller.Shooting.GetMuzzleDirection() * 90, Color.green);
         if (Physics.SphereCast(controller.transform.position, rayRadius,
                                controller.Shooting.GetMuzzleDirection(), out RaycastHit hit, layerMask))
         {
             controller.Shooting.Shoot();
         }
     }
 }
コード例 #2
0
ファイル: SearchDecision.cs プロジェクト: Scaelz/ENT-Tanks
 bool SearchForPlayer(AiController controller)
 {
     if (!controller.Movement.IsMoving())
     {
         if (controller.CheckActionTimer(decisionTimer))
         {
             controller.TrackPlayer(false);
             return(true);
         }
     }
     return(false);
 }