private void ActivateModeZone(bool forced) { if (modeID == 4 && ActionID != null) { ID.Value = ActionID; //Use Action ID Instead } if (forced || automatic) { CurrentAnimal.Mode_Activate((int)modeID, ID); //Current animal was empty ??!?!??! OnZONEActive(); if (automatic) { StartCoroutine(ZoneColliderONOFF()); } } else { //In Case the Zone is not Automatic var PreMode = CurrentAnimal.Mode_Get(modeID); if (PreMode != null) { PreMode.AbilityIndex = ID; PreMode.GlobalProperties.OnEnter.AddListener(OnZONEActive); } } }
public virtual void ResetStoredAnimal() { CurrentAnimal.IsOnZone = false; if (zoneType == ZoneType.Mode) { var PreMode = CurrentAnimal.Mode_Get(modeID); if (PreMode != null) { PreMode.ResetAbilityIndex(); PreMode.GlobalProperties.OnEnter.RemoveListener(OnZONEActive); } } CurrentAnimal = null; animal_Colliders = new List <Collider>(); //Clean the colliders }