Пример #1
0
        public void AfterActivate_HasStatusActive_Test()
        {
            Action action = new Think();

            action.Activate();
            Assert.Equal(ActionEnum.STATUS_ACTIVE, action.Status);
        }
Пример #2
0
        public SmartEntity(Vector2 pos, World w, string name) : base(pos, w)
        {
            /*
             * INIT FUZZY MODULES
             */
            _fuzzyThirst = new Thirst();
            _fuzzyHunger = new Hunger();
            _fuzzySleep  = new Sleep();

            NAME = name;
            // random stats
            hunger    = MyWorld.Random.Next(0, 25);
            thirst    = MyWorld.Random.Next(0, 25);
            tiredness = MyWorld.Random.Next(0, 25);

            Velocity = new Vector2(0, 0);
            Think    = new Think(this);
            Think.Activate();
            Behaviours = new List <SteeringBehaviour>
            {
                new WanderBehaviour(this, 90, 100),
                new WallAvoidance(this, 15)
            };
        }