示例#1
0
        public static void Init()
        {
            Void = new HexType("Void").SetMaterial("Void");

            Cell = new HexType("Cell");
            Cell.AddAction(HexAction.CreateRuneBasicBlank);
            Cell.AddAction(HexAction.CreateRuneBasicSpace);
            Cell.AddAction(HexAction.CreateRuneBasicStability);
            Cell.AddAction(HexAction.CreateClusterBasicExpansion);
            Cell.AddAction(HexAction.CreateClusterBasicWorkshop);
            Cell.SetModel("Cell");
            Cell.SetMaterial("Cell");

            Expansion = new HexType("Expansion");
            Expansion.SetMaterial("Expansion");

            Workshop = new HexType("Workshop");
            Workshop.SetMaterial("Workshop");
            Workshop.SetModel("Workshop");
            Workshop.AddAction(HexAction.CreateRuneBasicBlank);
            Workshop.AddAction(HexAction.CreateRuneBasicSpace);
            Workshop.AddAction(HexAction.CreateRuneBasicStability);
            Workshop.AddAction(HexAction.CreateRuneBasicOre);
            Workshop.AddAction(HexAction.CreateClusterBasicExpansion);
            Workshop.AddAction(HexAction.CreateClusterBasicWorkshop);


            Void.SetUpgrade(new HexUpgrade(HexType.Expansion).SetInput(new Item(ItemData.ClusterBasicExpansion).SetAmount(1)));
            Expansion.SetUpgrade(new HexUpgrade(HexType.Workshop).SetInput(new Item(ItemData.ClusterBasicWorkshop).SetAmount(1)));
        }
示例#2
0
        /// <summary>
        /// Instatiate the HexMap script
        /// </summary>
        void Start()
        {
            ItemData.CreateItemDatas();
            HexAction.Init();
            HexType.Init();

            GenerateMap();
        }
示例#3
0
        public void Upgrade()
        {
            foreach (Item item in Type.Upgrade.Input)
            {
                if (Inventory.GlobalInventory.CanRemoveItem(item) > 0)
                {
                    return;
                }
            }

            foreach (Item item in Type.Upgrade.Input)
            {
                Inventory.GlobalInventory.RemoveItem(item);
            }

            Type = Type.Upgrade.HexType;

            GameObject.Find("Hexmap").GetComponent <Data.HexMap>().UpdateMaterials();
        }
示例#4
0
 public HexUpgrade(HexType hexType)
 {
     this.HexType = hexType;
     Input        = new List <Item>();
 }