Beispiel #1
0
        public override IEnumerable GetEvaluationBlock()
        {
            var timer = new StepTimer(typedInfo.duration);

            while (timer.ValueNormalized < 1)
            {
                timer.Step(deltaTime);

                yield return(null);
            }

            item = null;
        }
Beispiel #2
0
        public override IEnumerable GetEvaluationBlock()
        {
            var info  = this.info as PickUpItemStateInfo;
            var timer = new StepTimer(info.duration);

            while (timer.ValueNormalized < 1f)
            {
                timer.Step(deltaTime);

                yield return(null);
            }

            target.NotifyPickUp(character);
            character.Inventory.AddItem(target.item);
            target = null;
        }
        public override IEnumerable GetEvaluationBlock()
        {
            var info = this.info as PickUpItemStateInfo;
            var timer = new StepTimer( info.duration );

            while ( timer.ValueNormalized < 1f ) {

                timer.Step( deltaTime );

                yield return null;
            }

            target.NotifyPickUp( character );
            character.inventory.AddItem( target.item );
            target = null;
        }