Beispiel #1
0
        public Whirlwind(WhirlwindSkill skill)
        {
            this.skill = skill;
            float occurences = skill.duration / skill.impactPeriod;

            impactDamages = skill.maxDamages / occurences;
        }
Beispiel #2
0
    // Load in skill prefabs and parent their hitboxes and scripts under the hero unit
    private void CreateSkills()
    {
        GameObject whirlwind = (GameObject)Instantiate(whirlwindPrefab, transform.position, Quaternion.identity);

        whirlwind.transform.SetParent(transform);
        WhirlwindSkill skill = whirlwind.GetComponent <WhirlwindSkill>();

        skill.SetHero(this);
        whirlwind.SetActive(false);
        activeSkill = skill;
    }