示例#1
0
 void Start()
 {
     enemys = GetComponent <BezierSolution.BezierWalkerLocomotion>().Tail.Select(x => x.GetComponent <SnakeSlave>()).ToList();
     foreach (SnakeSlave s in enemys)
     {
         s.transform.parent = transform;
     }
     OnDestroyWithScore.AddListener(MultiEnemyDestroyWithScore);
     OnDestroyWithoutScore.AddListener(MultiEnemyDestroyWithoutScore);
 }
示例#2
0
 public void DestroyWithScore()
 {
     if (Health > 0)
     {
         return;
     }
     if (CollisionHealth > 0)
     {
         CollisionHealth--;
     }
     if (CollisionHealth > 0)
     {
         return;
     }
     OnDestroyWithScore.Invoke();
     DestroyWithoutScore();
 }
示例#3
0
 public void DestroyWithScore()
 {
     OnDestroyWithScore.Invoke();
     DestroyWithoutScore();
 }
示例#4
0
 void Start()
 {
     OnDestroyWithScore.AddListener(EnemyDestroyWithScore);
     OnDestroyWithoutScore.AddListener(EnemyDestroyWithoutScore);
 }