示例#1
0
        protected override void OnTick(float deltaTime)
        {
            _voiceController.HandleVoiceInput();

            if (_stateController.ActiveStateName != null)
            {
                _stateController.Tick(deltaTime);
            }
        }
    private void Update()
    {
        _audioController?.Tick(Time.deltaTime);
        _stateController?.Tick(Time.deltaTime);
#if UNITY_EDITOR
        if (Input.GetKeyDown(KeyCode.DownArrow))
        {
            ScreenCapture.CaptureScreenshot(System.DateTime.UtcNow.ToFileTimeUtc() + ".png");
        }
#endif
    }
示例#3
0
        public void TickTransition(string fromStateName, string toStateName)
        {
            // Arrange
            _stateController.Initialize();
            _stateController.EnterState(fromStateName);
            _stateTransitionBlackboard.ToStateName = toStateName;

            // Act
            _stateController.Tick(0f);

            // Assert
            Assert.AreEqual(toStateName, _stateController.ActiveStateName);
        }
示例#4
0
 private void Update()
 {
     if (_loaded)
     {
         _stateController.Tick(Time.deltaTime);
         if (Application.platform == RuntimePlatform.WindowsEditor)
         {
             if (Input.GetKeyDown(KeyCode.Insert))
             {
                 ScreenCapture.CaptureScreenshot(System.DateTime.UtcNow.ToFileTimeUtc() + ".png");
             }
         }
     }
 }
        public void TickTransition(Type fromState, Type toState)
        {
            // Arrange
            var fromStateName = fromState.FullName;
            var toStateName   = toState.FullName;

            _stateController.Initialize();
            _stateController.EnterState(fromStateName);
            _tickStateTransitionBlackboard.ToStateName = toStateName;

            // Act
            _stateController.Tick(0f);

            // Assert
            Assert.Equal(toStateName, _stateController.ActiveStateName);
        }
示例#6
0
        protected override void OnTick(float deltaTime)
        {
            try
            {
                if (_photonClient.ClientState == PlayGen.Photon.Unity.Client.ClientState.Disconnected)
                {
                    _photonClient.Connect();
                }

                _stateController.Tick(deltaTime);
            }
            catch (Exception exception)
            {
                LogProxy.Error(exception.ToString());
                LogProxy.Debug(exception.StackTrace);
                OnException(exception);
            }
        }
示例#7
0
 protected override void OnTick(float deltaTime)
 {
     _stateController.Tick(deltaTime);
 }
示例#8
0
 private void Update()
 {
     _stateController.Tick(Time.deltaTime);
 }