public virtual void Init(EntityPhysics body, Player player, Pawn heroData) { powerUpManager = GetComponent <HeroPowerUpManager> (); this.body = body; this.player = player; sound = SoundManager.instance; anim = heroData.GetAnimationSet(); anim.Init(player.animPlayer); anim.player.Init(); damageMultiplier = 1f; baseDamage = Mathf.RoundToInt(Pawn.DamageEquation(heroData)); // init cooldownMultipliers cooldownMultipliers = new float[cooldownTime.Length]; for (int i = 0; i < cooldownTime.Length; i++) { cooldownMultipliers [i] = 1; } player.maxHealth = maxHealth; powerUpManager.Init(heroData); player.OnPlayerDamaged += ResetCombo; player.OnEnemyDamaged += IncrementCombo; player.OnEnemyDamaged += IncrementSpecialAbilityCharge; }
private void Init() { powerUpHolder = player.hero.powerUpManager; UpdatePowerUpsMeter(); player.hero.powerUpManager.OnPowerUpAdded += UpdatePowerUpsMeter; }