Пример #1
0
        //
        // Setup
        //
        private void CreateBasicRoamingDweller()
        {
            // think about moving to a random position every now and then.
            Thoughts.Add(new BasicRandomMovementThought(this));

            // think about food
            var bfd = new BasicFoodThought(this);

            Thoughts.Add(bfd);

            // think about sleeping
            var bst = new BasicSleepThought(this);

            Thoughts.Add(bst);
        }
Пример #2
0
        public void AddThought(Thought thought, bool allowDuplicates)
        {
            if (allowDuplicates)
            {
                Thoughts.Add(thought);
            }
            else
            {
                if (HasThought(thought.Type))
                {
                    return;
                }

                Thoughts.Add(thought);
            }
            bool good = thought.HappinessModifier > 0;
            Color textColor = good ? Color.Yellow : Color.Red;
            string prefix = good ? "+" : "";
            string postfix = good ? ":)" : ":(";
            IndicatorManager.DrawIndicator(prefix + thought.HappinessModifier + " " + postfix, Position + Vector3.Up + MathFunctions.RandVector3Cube() *0.5f, 1.0f, textColor);
        }