private void OnCollisionExit2D(Collision2D collision) { var collisionTag = ObjectService.GetTag(collision); if (TagName.PLAYER == collisionTag) { PropagateAllSaveEvents.EnableSave(); } }
private void OnCollisionStay2D(Collision2D collision) { var collisionTag = ObjectService.GetTag(collision); var playeranimator = collision.gameObject.GetComponent <Player>().Animator; var runningAnimation = AnimationService.GetAnimationName(playeranimator) == AnimationName.ACTIVATE || AnimationService.GetAnimationName(playeranimator) == AnimationName.COLLECT; if (TagName.PLAYER == collisionTag && runningAnimation) { PropagateAllSaveEvents.DisableSave(); PropagateTriggerEvents(); Invoke("SwitchSaveAfterSeconds", 3); } }
private void OnCollisionStay2D(Collision2D collision) { var collisionTag = ObjectService.GetTag(collision); var playerOnSavePosition = TagName.PLAYER == collisionTag && UserIsExecutingSaveAnimation(collision); if (playerOnSavePosition && PropagateAllSaveEvents.AllowSave) { PropagateTriggerEvents(); PropagateAllSaveEvents.DisableSave(); } else if (TagName.PLAYER == collisionTag && !UserIsExecutingSaveAnimation(collision)) { PropagateAllSaveEvents.EnableSave(); } }
private void SwitchSaveAfterSeconds() { PropagateAllSaveEvents.EnableSave(); }
public override void PropagateTriggerEvents() { TriggerEventChannels.PropagateMessageEvent(CurrentMessage, MessageTime); PropagateAllSaveEvents.Save(SceneManager.GetActiveScene().name); }
public void SaveTest() { PropagateAllSaveEvents.EnableSave(); PropagateTriggerEvents(); }