Пример #1
0
    private IEnumerator MovingSkills()
    {
        while (!movingSkillRunning)
        {
            switch (Random.Range(0, 3))
            {
            case 0:
                Skill om = new OrionMove();
                om_Behaviour.Use(Enemy);
                movingSkillRunning = true;
                yield return(new WaitForSeconds(om.SkillCoolDown));

                movingSkillRunning = false;
                break;

            case 1:
                Skill tel = new Teleporter();
                tel_Behaviour.Use(Enemy);
                movingSkillRunning = true;
                yield return(new WaitForSeconds(tel.SkillCoolDown));

                movingSkillRunning = false;
                break;

            case 2:
                Skill cir = new CircleMove();
                StartCoroutine(circle_Move_Behaviour.Use(Enemy));
                movingSkillRunning = true;
                yield return(new WaitForSeconds(cir.SkillCoolDown));

                movingSkillRunning = false;
                break;
            }
        }
    }
Пример #2
0
    public void DSkill(int skillIndex)
    {
        StartCoroutine(circle_Move_Behaviour.Use(Player));

        DSlot.CoolDownCounter(CreatePlayer.chosenShip.DSkill, dSkillSlot);
    }