Exemplo n.º 1
0
 /// <summary>
 /// 敵プレーヤー全部spawn
 /// </summary>
 /// <param name="posq">生成位置のキュー</param>
 private void SpawnEnemies(Queue <Transform> posq)
 {
     foreach (var enInfo in enemyInfo)
     {
         var epl = SpawnPlayer(enInfo, posq.Dequeue());
         // EnemyController をつけて、ゲーム開始時に動作開始するように設定。
         var econ = epl.gameObject.AddComponent <EnemyController>();
         onGameStart.AddListener(t => econ.StartControl(this));
     }
 }
Exemplo n.º 2
0
 public void AddListener(UnityEngine.Events.UnityAction <object, System.Timers.ElapsedEventArgs> action)
 {
     _timerEvent.AddListener(action);
 }
 public void AddTimerEventListener(UnityAction listener)
 {
     timerEvent.AddListener(listener);
 }