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); }
public void DestroyWithScore() { if (Health > 0) { return; } if (CollisionHealth > 0) { CollisionHealth--; } if (CollisionHealth > 0) { return; } OnDestroyWithScore.Invoke(); DestroyWithoutScore(); }
public void DestroyWithScore() { OnDestroyWithScore.Invoke(); DestroyWithoutScore(); }
void Start() { OnDestroyWithScore.AddListener(EnemyDestroyWithScore); OnDestroyWithoutScore.AddListener(EnemyDestroyWithoutScore); }