예제 #1
0
    void doTrun(int a)
    {
        int x = a % 7;


        // //开始计时
        //timer.startTiming (1, OnComplete, OnProcess);

        if (HeroStatus.instance.used_activeskill[x].skillID == 20000)
        {
            int thisDamage = Damage();
            EnemyControl.instance.ReceiveDamage(thisDamage, normalAtk);
        }
        else
        {
            //Debug.Log(x + "检查技能cd" + cdTimers[HeroStatus.instance.used_activeskill[x].skillID].CurrentTime);
            playerSkill.CastActiveSkill(HeroStatus.instance.used_activeskill[x], x);
            //Debug.Log("aaaaaaaaa"+playerSkill.canCast);
            if (playerSkill.canCast)
            {
                playerSkill.playActiveSkill(HeroStatus.instance.used_activeskill[x]);
                cdTimers[HeroStatus.instance.used_activeskill[x].skillID].Start();
            }
            else
            {
                int thisDamage = Damage();
                EnemyControl.instance.ReceiveDamage(thisDamage, normalAtk);
            }
        }


        turnNumber = turnNumber + 1;
    }