示例#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);
        }
        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;
        }