Ejemplo n.º 1
0
    /// <summary>
    /// 大招触发
    /// </summary>
    override protected void OnUltShootOnEvent()
    {
        this.lastTargets = this.BattleAgent.Targets;

        //优先攻击浮空目标 Combo
        List <BattleAgent> floatList = BattleManager.SharedInstance.GetFloatTarget();

        if (floatList.Count > 0)
        {
            this.BattleAgent.ChangeTargets(floatList);
            isComboAttack = true;
        }


        lastPosition = this.gameObject.transform.position;

        GameObject bulletPrefab = ResourceManager.GetInstance.LoadPrefab(TestData.charDB [10].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(this.BattleAgent.Targets [0]);

        //baseBullet去目标所在行 屏幕中间播放

        StartCoroutine(MoveToSide());


        AttackMessage message = new AttackMessage(BattleAgent, this.BattleAgent.Targets, 1);

        if (isComboAttack)
        {
            message.ComboCount = 3;
        }


        baseBullet.AttachMiddle(message);

        this.BattleAgent.ChangeTargets(this.lastTargets);
        isComboAttack = false;
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 大招触发
    /// </summary>
    protected override void OnUltShootOnEvent()
    {
        this.lastTargets = this.BattleAgent.Targets;

        //优先攻击浮空目标 Combo
        List<BattleAgent> floatList = BattleManager.SharedInstance.GetFloatTarget ();
        if (floatList.Count > 0) {

            this.BattleAgent.ChangeTargets(floatList);
            isComboAttack=true;
        }

        lastPosition = this.gameObject.transform.position;

        GameObject bulletPrefab = ResourceManager.GetInstance.LoadPrefab (TestData.charDB [10].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 (this.BattleAgent.Targets [0]);

        //baseBullet去目标所在行 屏幕中间播放

        StartCoroutine (MoveToSide ());

        AttackMessage message = new AttackMessage (BattleAgent, this.BattleAgent.Targets, 1);

        if (isComboAttack) {
            message.ComboCount = 3;
        }

        baseBullet.AttachMiddle (message);

        this.BattleAgent.ChangeTargets(this.lastTargets);
        isComboAttack=false;
    }