Ejemplo n.º 1
0
 public StockResourceAct(CreatureAI agent, ResourceAmount item) :
     base(agent)
 {
     ItemToStock = item.CloneResource();
     Name        = "Stock Item";
     Tree        = null;
 }
Ejemplo n.º 2
0
 public StockResourceAct(CreatureAI agent, ResourceAmount item)
     : base(agent)
 {
     ItemToStock = item.CloneResource();
     Name = "Stock Item";
     Tree = null;
 }
Ejemplo n.º 3
0
 public StockResourceTask(ResourceAmount entity)
 {
     Category       = TaskCategory.Gather;
     EntityToGather = entity.CloneResource();
     Name           = "Stock Entity: " + entity.ResourceType + " " + entity.NumResources;
     Priority       = PriorityType.Low;
 }
Ejemplo n.º 4
0
 public StockResourceTask(ResourceAmount entity)
 {
     Category        = TaskCategory.Gather;
     EntityToGather  = entity.CloneResource();
     Name            = "Stock Entity: " + entity.ResourceType + " " + entity.NumResources;
     Priority        = PriorityType.Medium;
     ReassignOnDeath = false;
     BoredomIncrease = GameSettings.Default.Boredom_NormalTask;
 }
Ejemplo n.º 5
0
 public StockResourceTask(ResourceAmount entity)
 {
     Category        = TaskCategory.Gather;
     EntityToGather  = entity.CloneResource();
     Name            = "Stock Entity: " + entity.ResourceType + " " + entity.NumResources;
     Priority        = PriorityType.Low;
     ReassignOnDeath = false;
     BoredomIncrease = 0.1f;
 }
Ejemplo n.º 6
0
        public List <Body> RemoveAndCreate(ResourceAmount resources)
        {
            List <Body> toReturn = new List <Body>();

            if (!Resources.RemoveResource(resources.CloneResource()))
            {
                return(toReturn);
            }

            for (int i = 0; i < resources.NumResources; i++)
            {
                Body newEntity = EntityFactory.CreateEntity <Body>(resources.ResourceType.ResourceName + " Resource",
                                                                   GlobalTransform.Translation + MathFunctions.RandVector3Cube() * 0.5f);
                toReturn.Add(newEntity);
            }

            return(toReturn);
        }
Ejemplo n.º 7
0
        public List <Body> RemoveAndCreate(ResourceAmount resources, RestockType type)
        {
            var         parentBody = GetRoot() as Body;
            var         pos        = parentBody == null ? GlobalTransform.Translation : parentBody.Position;
            List <Body> toReturn   = new List <Body>();

            if (!Remove(resources.CloneResource(), type))
            {
                return(toReturn);
            }

            for (int i = 0; i < resources.NumResources; i++)
            {
                Body newEntity = EntityFactory.CreateEntity <Body>(resources.ResourceType + " Resource",
                                                                   pos + MathFunctions.RandVector3Cube() * 0.5f);
                toReturn.Add(newEntity);
            }

            return(toReturn);
        }
Ejemplo n.º 8
0
        public List<Body> RemoveAndCreate(ResourceAmount resources)
        {
            List<Body> toReturn = new List<Body>();

            if(!Resources.RemoveResource(resources.CloneResource()))
            {
                return toReturn;
            }

            for(int i = 0; i < resources.NumResources; i++)
            {
                Body newEntity = EntityFactory.CreateEntity<Body>(resources.ResourceType.ResourceName + " Resource",
                    GlobalTransform.Translation + MathFunctions.RandVector3Cube()*0.5f);
                toReturn.Add(newEntity);
            }

            return toReturn;
        }
Ejemplo n.º 9
0
 public StockResourceTask(ResourceAmount entity)
 {
     EntityToGather = entity.CloneResource();
     Name = "Stock Entity: " + entity.ResourceType.ResourceName + " " + entity.NumResources;
     Priority = PriorityType.Low;
 }