LazyBot/Assets/Scripts/Entity/EntityController.cs
/// <summary>
/// Turns controller to sleep. 
/// After specified amount of time performs instant state change.
/// </summary>
/// <param name="time">
/// Time to be sleepped.
/// Negative value perform instant state change.
/// </param>
Turns controller to sleep.
After specified amount of time performs instant state change.
Turns controller to sleep . After specified amount of time performs instant state change .
public virtual void MakeInstantStateChange(float time)
        {
            ResetSleep();
            if (time < 0.0f)
            {
                _isBlock = false;
                return;
            }
            _isSleep = true;
            _isBlock = true;
            _sleepCoroutation = RunLaterValued(
                () =>
                {
                    this._isSleep = false;
                    this._isBlock = false;
                },
                time
            );
        }
public virtual void MakeInstantStateChange ( float time ) { ResetSleep ( ) ; if ( time < 0.0f ) { _isBlock = false ; return ; } _isSleep = true ; _isBlock = true ; _sleepCoroutation = RunLaterValued ( ( ) => { this . _isSleep = false ; this . _isBlock = false ; } , time ) ; }
Turns controller to sleep.
Turns controller to sleep .
time
float
Time to be sleepped.
Negative value perform instant state change.
Time to be sleepped . Negative value perform instant state change .