Esempio n. 1
0
        public void CreateAdult()
        {
            SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_env_plant_grow, Position, true);
            var adult = EntityFactory.CreateEntity <Plant>(AdultName, LocalPosition);

            adult.IsGrown = true;
            if (Farm != null)
            {
                adult.Farm = Farm;
                var task = new ChopEntityTask(adult)
                {
                    Priority = Task.PriorityType.Low
                };
                World.Master.TaskManager.AddTask(task);
            }
            Die();
        }
Esempio n. 2
0
        public void CreateAdult()
        {
            SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_env_plant_grow, Position, true);
            var adult = EntityFactory.CreateEntity <Plant>(AdultName, LocalPosition);

            adult.IsGrown = true;

            if (Farm != null)
            {
                adult.Farm = Farm;
                if (GameSettings.Current.AllowAutoFarming)
                {
                    var task = new ChopEntityTask(adult)
                    {
                        Priority = TaskPriority.Low
                    };
                    World.TaskManager.AddTask(task);
                }
            }

            Die();
        }