Пример #1
0
        public override void Action()
        {
            base.Action();

            this.unit.StartCoroutine(SkillUtility.FireProjectile_CircularSector(
                                         this.unit,
                                         this.firePivot.position,
                                         this.info.power,
                                         this.info.lifeTime,
                                         this.info.bulletCount,
                                         360,
                                         this.info.fireCount,
                                         this.info.cycle,
                                         true,
                                         SoundKeys.EFFECT_DEFAULT_ATTACK));
        }
Пример #2
0
        public override void OnStartAttackEvent(int index)
        {
            base.OnStartAttackEvent(index);
            switch (this.attackType)
            {
            case DefaultAttackType.Melee:
                SkillUtility.SimpleRangeDamage(this, this._firePivot.position, 1.5f, this.unitSide, this.defaultDamage, PrefabPath.Particle.FireHit, SoundKeys.EFFECT_HIT_SOUND);
                SoundManager.inst.PlaySound(SoundKeys.EFFECT_PUNCH, this._firePivot.position);
                break;

            case DefaultAttackType.ParabolaBomb:
            {
                //타겟이 없으면 안쏨
                if ((this.controller as SimpleAIController).target == null)
                {
                    return;
                }


                // 불릿 생성후 발사
                var bullet = ObjectPoolManager.inst.Get <BombBullet>(PrefabPath.Projectile.BombBullet);

                bullet.transform.position = this._firePivot.transform.position;

                // 불릿 초기화 및 발사
                bullet.Init(this, 1, 10);

                bullet.range = 1;
                bullet.FireParabola((this.controller as SimpleAIController).target.transform.position);
            }
            break;

            case DefaultAttackType.CircularSector:
                SoundManager.inst.PlaySound(SoundKeys.EFFECT_DEFAULT_ATTACK, this._firePivot.position);
                StartCoroutine(SkillUtility.FireProjectile_CircularSector(this, this._firePivot.position, 3, 3, 3, 90, 1, 0.5f));
                break;

            default:
                break;
            }
        }