コード例 #1
0
ファイル: StateMachine.cs プロジェクト: davidmae/GaiaBots
        // Condiciones de salida
        private IEnumerator CheckIfActorFinishWithConsumable(IConsumable consumable, StatusTypes statusType)
        {
            bool done = false;

            while (!done)
            {
                // If consumable is depleted
                if (consumable.GetSacietyPoints() <= 0)
                {
                    done = true;
                }

                // If actor is full
                if (IfActorIsFull(statusType))
                {
                    done = true;
                }

                yield return(null);
            }
        }