示例#1
0
 /// <summary>
 /// Constructor of the Behaviour Block
 /// </summary>
 /// <param name="owningCreatureAI">Reference to the creature owning the Behaviour Block.</param>
 /// <param name="resourceType">The resource type to find and extract.</param>
 public FindAndExtractResource(CreatureAI owningCreatureAI, Resources.ResourceType resourceType) : base(owningCreatureAI,
                                                                                                        new MoveToClosestResourceOfType(owningCreatureAI, resourceType),
                                                                                                        new ExtractResource(owningCreatureAI, resourceType),
                                                                                                        new MoveToClosestBuildingOfType <Bonfire>(owningCreatureAI),
                                                                                                        new DepositResourcesIntoBonfire(owningCreatureAI))
 {
 }
示例#2
0
 public void SetValues(Resources.ResourceType _selectedItem)
 {
     itemNameText.text = Resources.GetName(_selectedItem);
     itemAmount        = Resources.GetResourceAmount(_selectedItem) / 2;
     sellValue         = Resources.GetSellValue(_selectedItem) * itemAmount;
     UpdateValues();
     selectedItem = _selectedItem;
 }
示例#3
0
 public Recipe(Resources.ResourceType resourceType,
               int productionCount, int time,
               Dictionary <Resources.ResourceType, int> resources, Text buttonText, GameObject button)
 {
     this.resourceType    = resourceType;
     this.productionCount = productionCount;
     this.time            = time;
     this.button          = button;
     this.resources       = resources;
     this.buttonText      = buttonText;
     this.buttonText.text = Resources.GetName(resourceType);
     currentStage         = Stage.Idle;
 }