Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }