void Handle(CountDownEvent e) { constraint.ForEachGameObject((egoComponent, transform, playerComponent) => { transform.position = playerComponent.startPosition; transform.eulerAngles = playerComponent.startRotation; }); }
void Handle(CountDownEvent e) { constraint.ForEachGameObject((egoComponent, transform, lineRenderer, lineRendererComponent) => { lineRendererComponent.lineRendererPointCount = 0; lineRenderer.numPositions = 0; Debug.Log("LineRendererCountDown"); }); }
void Handle(CountDownEvent e) { constraint.ForEachGameObject((egoComponent, countDownComponent) => { countDownComponent.myCountDownStatus = CountDownComponent.CountDownStatus.active; countDownComponent.timeElapsed = 0; Time.timeScale = 1; egoComponent.gameObject.SetActive(true); Debug.Log("Countdown"); }); }
void Handle(CountDownEvent e) { constraint.ForEachGameObject((egoComponent, mainMenuComponent) => { mainMenuComponent.myMenuStatus = MainMenuComponent.MenuStatus.inactive; egoComponent.gameObject.SetActive(false); }); InitializeNewGameEvent newGame = new InitializeNewGameEvent(); EgoEvents <InitializeNewGameEvent> .AddEvent(newGame); Debug.Log("started new game"); }
private IEnumerator Countdown() { while (startCountdown > 0) { CountDownEvent?.Invoke(startCountdown, false); yield return(new WaitForSecondsRealtime(1f)); startCountdown--; } CountDownEvent?.Invoke(startCountdown, true); _isPlaying = true; Time.timeScale = 1f; }
public override void Update() { constraint.ForEachGameObject((egoComponent, mainMenuComponent) => { if (mainMenuComponent.myMenuStatus == MainMenuComponent.MenuStatus.active) { if (KutiInput.Instance.GetButtonDown(EKutiButton.P1Left) || KutiInput.Instance.GetButtonDown(EKutiButton.P1Up) || KutiInput.Instance.GetButtonDown(EKutiButton.P1Right) || KutiInput.Instance.GetButtonDown(EKutiButton.P2Left) || KutiInput.Instance.GetButtonDown(EKutiButton.P2Up) || KutiInput.Instance.GetButtonDown(EKutiButton.P2Right) || Input.anyKeyDown) { var e = new CountDownEvent(); EgoEvents <CountDownEvent> .AddEvent(e); Debug.Log("Countdown Event startet"); } } }); }
public void SendEvent(CountDownEvent e) { if (e == CountDownEvent.ENDED) { if (waitingStartCountDown) { waitingStartCountDown = false; controllerCollection.SetCanMove(true); battleCountDown.StartCountDown(BattleTimer.SecondsInBattle); } else { controllerCollection.SetCanMove(false); SendEvent(BattleEvent.ENDED); } } }
public override void FixedUpdate() { constraint.ForEachGameObject((egoComponent, transform, playerComponent) => { if (playerComponent.timeElapsed == -1) { } else if (playerComponent.timeElapsed >= 3) { var e = new CountDownEvent(); EgoEvents <CountDownEvent> .AddEvent(e); playerComponent.timeElapsed = -1; } else { playerComponent.timeElapsed += Time.deltaTime; } }); }
public static void Main(string[] args) { //Class @class = new Class(); //@class.Ces(); //SelfDefineTaskSchedule_Test.DO(); //ThreadPoolUnity.Do(); //ThreadPoolUnity.Timer(); //TaskUnity.Do(); //TaskUnity.Do2(); //TaskUnity.Do3(); //TaskUnity.Do4(); //ParallelUnity.DO(); //ReaderWriterLockUnity.DO(); CountDownEvent.DO(); Console.Read(); CreateWebHostBuilder(args).Build().Run(); }
void Handle(CountDownEvent e) { constraint.ForEachGameObject((egoComponent, animation, player, spriteRenderer, collider, rb) => { spriteRenderer.sprite = animation.normalSprite; }); }
// Wrap the event in a protected virtual method // to enable derived classes to raise the event. protected virtual void RaiseCountDownEvent() { // Raise the event in a thread-safe manner using the ?. operator. CountDownEvent?.Invoke(this); }
public byte[] Call(byte[] memento) { CountDownEvent.Wait(); return(null); }
void Handle(CountDownEvent e) { constraint.ForEachGameObject((egoComponent, transform, rigidbdy, movement, player) => { movement.myFlyStatus = MovementComponent.FlyStatus.notFlying; }); }
public byte[] Call(byte[] memento) { StartEvent.Signal(); CountDownEvent.Wait(); return(null); }
void Handle(CountDownEvent e) { constraint.ForEachGameObject((egoComponent, gameOver) => { egoComponent.gameObject.SetActive(false); }); }