public void CleanUp() { if (!myIsActive) { return; } myIsActive = false; myImpactedMovement.AddToJumpHeight(-myJumpModifier); }
// TODO: Probably needs a revisit when its time for online multiplayer. public IEnumerator ScheduleEffect(GameObject player) { myImpactedMovement = player.GetComponent <PlayerMovement>(); if (myIsActive) { myImpactedMovement.AddToJumpHeight(myJumpModifier); } yield return(new WaitForSeconds(myActiveTime)); CleanUp(); }