public virtual void OnNotify(string gameEvent, int cooldownIndex) { switch (gameEvent) { case Constants.BUFF_OVER: if (this != null) { resetEnchantments(); if (cooldownIndex == 3) { moveSpeed = Constants.PLAYER_DEFAULT_MOVEMENTSPEED; } onEnchantmentCD = cdManager.GetBuffCooldown(); } break; } }
protected override void Start() { base.Start(); cdManager = GetComponentInParent <CooldownManager>(); lastMove.x = 0; lastMove.y = -1; animator = GetComponent <Animator>(); onEnchantmentCD = cdManager.GetBuffCooldown(); if (_hitpoints <= 0) { isDead = true; } if (isDead) { reviveOnLevelLoad(); } //SceneManager.sceneLoaded += onSceneLoaded; }