public void RunToElevator() { _isAngry = false; _animator.EndAngry(); _warningCanvas.SetActive(false); _transformRoot.DORotate(new Vector3(0, 90, 0), 1.19f, RotateMode.Fast).OnComplete(() => { _animator.Run(); if (!_reachedWaitPos) { return; } StartCoroutine(DelayUntilRun()); }); }
public override void Spawn(FloorData currentFloor, FloorData desiredFloor, ElevatorController elevator, Material material, GameManager gm) { gm.OnElevatorStoped += ElevatorStoped; gm.OnFloorChanged += ElevatorMoved; gm.OnFailedToGetPosition += HandleCrowdedFloor; _gameManager = gm; _elevator = elevator; _currentFloor = currentFloor; DesiredFloor = desiredFloor; MeshRenderer.material = material; _meshRendererRagDoll.material = material; _animator = GetComponent <UserAnimator>(); _rigidbody = GetComponent <Rigidbody>(); _uiColorChanger = FindObjectOfType <UICcolorsChanger>(); _animator.Run(); RunToDeath(); }
private void PerformUltimateSacrifice() { _kamikaze = true; _animator.Run(); Vector3 finalDestination = new Vector3(_elevator.transform.position.x, _transformRoot.position.y, _elevator.transform.position.z); }