/** * Initialise the building with the given type and position. */ override public void Init(BuildingTypeData type, GridPosition pos){ data = new UpgradableBuildingData(); ((UpgradableBuildingData)data).level = 1; uid = System.Guid.NewGuid ().ToString (); Position = pos; this.Type = type; State = BuildingState.PLACING; CurrentActivity = null; CompletedActivity = null; view = gameObject; view.SendMessage ("UI_Init", this); view.SendMessage("SetPosition", data.position); }
/** * Initialise the building with the given type and position. */ override public void Init(BuildingTypeData type, GridPosition pos) { data = new UpgradableBuildingData(); ((UpgradableBuildingData)data).level = 1; uid = System.Guid.NewGuid().ToString(); Position = pos; this.Type = type; State = BuildingState.PLACING; CurrentActivity = null; CompletedActivity = null; view = gameObject; view.SendMessage("UI_Init", this); view.SendMessage("SetPosition", data.position); }