Exemplo n.º 1
0
    public void BuildBuilding(int type, int subtype, int index)
    {
        Entity t = TriIsleland.GetBuildingPrefabs(type, subtype, index);

        Selector.Instance.RequestLocation((Unit)selected, t.sizeType, new BuildCommand(t));
        Close();
    }
Exemplo n.º 2
0
    public static new BuildCommand Load(BinaryReader reader)
    {
        TriGrid      instance = TriGrid.Instance;
        TriCell      tCell    = instance.GetCell(TriCoordinates.Load(reader));
        TriDirection tDir     = (TriDirection)reader.ReadInt32();
        Entity       prefab   = TriIsleland.GetBuildingPrefabs(reader.ReadInt32(), reader.ReadInt32(), 0);

        return(new BuildCommand(tCell, tDir, prefab));
    }
Exemplo n.º 3
0
    public void CreateHall(TriDirection dir, TriCell cell)
    {
        Hall ret = (Hall)CreateBuilding(dir, cell, (Building)TriIsleland.GetBuildingPrefabs((int)BuildingType.HALL, (int)HallType.BASE, 0));

        if (ret)
        {
            TriIsleland.Instance.entities.camp = ret;
            for (int i = 0; i < 4; i++)
            {
                Unit t = CreateUnit(ret.EntranceLocation, (Unit)TriIsleland.GetUnitPrefabs((int)UnitType.PERSON, 0));
                ((Person)t).Home = null;
                t.AddCommand(new GetInCommand(ret));
            }
            ret.Working = true;
        }
    }
Exemplo n.º 4
0
    public new static LoggingFacility Load(BinaryReader reader)
    {
        LoggingFacility ret = (LoggingFacility)Instantiate(TriIsleland.GetBuildingPrefabs((int)BuildingType.COMPANY, (int)CompType.CONSTRUCTOR, 0));

        return(ret);
    }
Exemplo n.º 5
0
 public static new Camp Load(BinaryReader reader)
 {
     return(Instantiate((Camp)TriIsleland.GetBuildingPrefabs((int)BuildingType.HALL, (int)HallType.BASE, 0)));
 }
Exemplo n.º 6
0
 public static new Farmland Load(BinaryReader reader)
 {
     return(Instantiate((Farmland)TriIsleland.GetBuildingPrefabs((int)BuildingType.WORKSITE, (int)WorkType.FARMLAND, 0)));
 }
Exemplo n.º 7
0
 public static new Tent Load(BinaryReader reader)
 {
     return(Instantiate((Tent)TriIsleland.GetBuildingPrefabs((int)BuildingType.INN, (int)InnType.TENT, 0)));
 }
Exemplo n.º 8
0
    public new static Processor Load(BinaryReader reader)
    {
        Processor ret = (Processor)Instantiate(TriIsleland.GetBuildingPrefabs((int)BuildingType.COMPANY, (int)CompType.PROCESSOR, 0));

        return(ret);
    }
Exemplo n.º 9
0
    public new static WareHouse Load(BinaryReader reader)
    {
        WareHouse ret = (WareHouse)Instantiate(TriIsleland.GetBuildingPrefabs((int)BuildingType.COMPANY, (int)CompType.WAREHOUSE, 0));

        return(ret);
    }