protected override void OnUltShootOnEvent() { List<BattleAgent> targets = BattleManager.SharedInstance.GetEnemyList (); for (int i = 0; i < targets.Count; i++) { List<BattleAgent> tlist=new List<BattleAgent>(); tlist.Add(targets[i]); GameObject bulletPrefab = ResourceManager.GetInstance.LoadPrefab (TestData.charDB [1].Prefab); GameObject parent = StageManager.SharedInstance.EffectLayer; GameObject bullet = StageManager.SharedInstance.AddToStage (parent, bulletPrefab); baseBullet = bullet.AddComponent<BaseBullet> (); baseBullet.BattleAgent = this.BattleAgent; baseBullet.transform.position = MapUtil.GetHitPointWorld(targets[i]); AttackMessage message = new AttackMessage (BattleAgent, tlist, 1); baseBullet.FlyToTargetRoot (message,0.5f); } }
override protected void OnUltShootOnEvent() { List <BattleAgent> targets = BattleManager.SharedInstance.GetEnemyList(); for (int i = 0; i < targets.Count; i++) { List <BattleAgent> tlist = new List <BattleAgent>(); tlist.Add(targets[i]); GameObject bulletPrefab = ResourceManager.GetInstance.LoadPrefab(TestData.charDB [1].Prefab); GameObject parent = StageManager.SharedInstance.EffectLayer; GameObject bullet = StageManager.SharedInstance.AddToStage(parent, bulletPrefab); baseBullet = bullet.AddComponent <BaseBullet> (); baseBullet.BattleAgent = this.BattleAgent; baseBullet.transform.position = MapUtil.GetHitPointWorld(targets[i]); AttackMessage message = new AttackMessage(BattleAgent, tlist, 1); baseBullet.FlyToTargetRoot(message, 0.5f); } }