public Hook ( |
||
renderer | ||
s | ||
ti | int | |
fti | int | |
building | int | |
Результат | void |
private void LoadTeamVisuals(GameState state, int ti) { RTSTeam team = state.teams[ti]; // Create Unit Graphics var ums = ti == teamIndex ? FriendlyUnitModels : NonFriendlyUnitModels; for (int i = 0; i < team.Race.ActiveUnits.Length; i++) { int ui = team.Race.ActiveUnits[i].Index; RTSUnitData uData = team.Race.Units[ui]; RTSUnitModel uModel = RTSUnitDataParser.ParseModel(this, new FileInfo(uData.InfoFile), team.Race); uModel.Hook(this, state, ti, team.Race.ActiveUnits[i].Index); uModel.ColorScheme = team.ColorScheme; ums.Add(uModel); } // Create Building Graphics var bms = ti == teamIndex ? FriendlyBuildingModels : NonFriendlyBuildingModels; for (int i = 0; i < team.Race.ActiveBuildings.Length; i++) { RTSBuildingModel bModel = RTSBuildingDataParser.ParseModel(this, new FileInfo(team.Race.ActiveBuildings[i].InfoFile), team.Race); bModel.Hook(this, state, ti, teamIndex, team.Race.ActiveBuildings[i].Index); bModel.ColorScheme = team.ColorScheme; bms.Add(bModel); } }