Пример #1
0
    void Start()
    {
        tm = TerrainManager.instance;

        idleIcon.SetActive(false);

        //TODO: maybe refactor the resource type system so that the enum only represents color and there is an int for the level
        edibleResources.Add(ResourceInfo.GetIndexFromType(ResourceInfo.ResourceType.G1));
        edibleResources.Add(ResourceInfo.GetIndexFromType(ResourceInfo.ResourceType.G2));
        edibleResources.Add(ResourceInfo.GetIndexFromType(ResourceInfo.ResourceType.G3));
    }
Пример #2
0
    void ResetInventory()
    {
        for (int i = 0; i < inventory.Count; i++)
        {
            inventory [i] = 0f;
        }

        //temp
        inventory[ResourceInfo.GetIndexFromType(ResourceInfo.ResourceType.G1)] = 3f;

        UpdateInventoryUI();
    }
Пример #3
0
 public SavedResourceTile(TerrainManager.Tile tile)
 {
     tilePos       = new SavedTilePos(TerrainManager.PosToV2(tile.tile.transform.position));
     resourceIndex = ResourceInfo.GetIndexFromType(tile.resourceType);
 }