private void LoadBulletAssets(Bullet bullet) { IDataController dc = Service.Get <IDataController>(); List <IAssetVO> list = new List <IAssetVO>(); ProjectileUtils.AddProjectileAssets(bullet.ProjectileType, list, dc); if (bullet.AppliedBuffs != null) { int i = 0; int count = bullet.AppliedBuffs.Count; while (i < count) { list.Add(bullet.AppliedBuffs[i].BuffType); i++; } } this.LoadProjectileAssetsAndCreatePools(list); }
public override void Execute() { base.Execute(); Vector3 zero = Vector3.zero; zero.x = Units.BoardToWorldX(this.boardX); zero.z = Units.BoardToWorldX(this.boardZ); IDataController dataController = Service.Get <IDataController>(); SpecialAttackTypeVO specialAttackTypeVO = dataController.Get <SpecialAttackTypeVO>(this.prepareArgs[0]); SpecialAttack specialAttack = Service.Get <SpecialAttackController>().DeploySpecialAttack(specialAttackTypeVO, TeamType.Attacker, zero); if (specialAttack != null) { List <IAssetVO> assets = new List <IAssetVO>(); ProjectileUtils.AddProjectileAssets(specialAttackTypeVO.ProjectileType, assets, dataController); Service.Get <ProjectileViewManager>().LoadProjectileAssetsAndCreatePools(assets); Service.Get <EventManager>().SendEvent(EventId.SpecialAttackDeployed, specialAttack); } this.parent.ChildComplete(this); }