private IEnumerator MoveOnNextUpdate(HallMovingTriggerEnteredEvent hmtee) { yield return(new WaitWhile(() => Time.frameCount < hmtee.frameNumber)); transform.Translate(hmtee.newPosition - hmtee.oldPosition, Space.World); transform.RotateAround(hmtee.newPosition, Vector3.up, hmtee.newRotation.y - hmtee.oldRotation.y); }
private void ProcessHallMoveinTriggerEnteredEvent(HallMovingTriggerEnteredEvent e) { ++roomsVisited_; if (!keyFound_) { AddMadness(MADNESS_PER_ROOM_VISIT); } }
public void OnReceived(EBEvent e) { if (e.type == EBEventType.HallMovingTriggerEntered) { HallMovingTriggerEnteredEvent hmtee = (e as HallMovingTriggerEnteredEvent); StartCoroutine(MoveOnNextUpdate(hmtee)); } }