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; } }
public static new Person Load(BinaryReader reader) { Person ret = Instantiate((Person)TriIsleland.GetUnitPrefabs((int)UnitType.PERSON, 0)); TriCell tLoc = TriGrid.Instance.GetCell(TriCoordinates.Load(reader)); if (tLoc) { ret.Home = (Inn)tLoc.Statics; } tLoc = TriGrid.Instance.GetCell(TriCoordinates.Load(reader)); if (tLoc) { ret.Company = (Company)tLoc.Statics; } tLoc = TriGrid.Instance.GetCell(TriCoordinates.Load(reader)); if (tLoc) { ret.Work = tLoc.Statics; } return(ret); }