private void OnEnd() { Task task = Task.Factory.StartNew(() => { OnEndEvent?.Invoke(); } ); }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Player") || collision.gameObject.CompareTag("Trailer")) { if (collision.contacts[0].thisCollider.CompareTag("Border")) { exercisesScriptable.IsPassed = false; exercisesScriptable.Score = 5; exercisesScriptable.PrematureTermination = true; OnEndEvent?.Invoke(); } } }
public void EndExercise(bool withMiddleMistake) { if (withMiddleMistake) { AddMistakeInvoke(3); } CountScroreOfTasks?.Invoke(); int currentScore = GameManager.CurrentScore; exercisesScriptable.IsPassed = currentScore < 5; exercisesScriptable.Score = currentScore; OnEndEvent?.Invoke(); }
public IEnumerable RunCounter() { var waitObject = new WaitForSeconds(WaitTime); while (Value > MinValue) { yield return(waitObject); OnCountEvent.Invoke(); Value--; } yield return(waitObject); OnEndEvent.Invoke(); }
private IEnumerator RunCounter() //used to be private Start() { var waitObject = new WaitForSeconds(WaitTime); while (Value > MinValue) { yield return(waitObject); OnCountEvent.Invoke(); //used to print value Value--; } yield return(waitObject); OnEndEvent.Invoke(); }
private void RunEndAction() { switch (currentConversation.endAction) { case EndAction.CHOICE: dialogueUI.toggleChoices(true); state = DialogueState.WaitforChoice; break; default: dialogueUI.toggleDialogueBox(false); InConversation = false; OnEndEvent?.Invoke(currentTrigger); OnDialogueStatus?.Invoke(true); break; } }
void Update() { switch (currentState) { case States.Start: OnStartEvent.Invoke(); break; case States.Playing: OnPlayingEvent.Invoke(); break; case States.End: OnEndEvent.Invoke(); break; } }
void Update() { switch (currentStates) { case states.Start: break; case states.Playing: break; case states.End: OnEndEvent.Invoke(); break; default: throw new ArgumentOutOfRangeException(); } }
IEnumerator Expand() { float time = 0; while (time < animationTime) { time += Time.deltaTime; float currentTime = time / animationTime; float alpha = a.Evaluate(currentTime); _Sprite.color = new Color(_Sprite.color.r, _Sprite.color.g, _Sprite.color.b, alpha); yield return(0); } if (OnEndEvent != null) { OnEndEvent.Invoke(); } }
private void Update() { switch (currentStates) { case States.Start: OnStartEvent.Invoke(); break; case States.Playtime: OnPlayerEvent.Invoke(); break; case States.End: OnEndEvent.Invoke(); break; default: throw new ArgumentOutOfRangeException(); } }
void Update() { switch (currentState) { case States.start: OnStartEvent.Invoke(); break; case States.playing: OnPlayingEvent.Invoke(); break; case States.end: OnEndEvent.Invoke(); break; default: throw new ArgumentOutOfRangeException(); } }
public void SetMovePositionCallBack(Vector3 _pos, OnEndEvent CallBackFunction) { callbackFct = CallBackFunction; StartCoroutine("MoveNewPosition", _pos); }