Ejemplo n.º 1
0
        void Cast(Character targetCharacter)
        {
            GameObject           projectile = Instantiate(ProjectilePrefab, CastTransform.position, Quaternion.identity) as GameObject;
            ProjectileController controller = projectile.GetComponent <ProjectileController>();

            controller.Init(targetCharacter, Self.Stats.Damage, ProjectHitSound);
        }
Ejemplo n.º 2
0
        protected override void Attack(DamageableGameObject target)
        {
            GameObject           projectile = Instantiate(projectilePrefab, castTransform.position, Quaternion.identity) as GameObject;
            ProjectileController controller = projectile.GetComponent <ProjectileController>();

            controller.Init(target, ofenseStats.damage);
            controller.onAttackStrike += onAttackStrike;
        }