public void Init() { _compounds = GameConfig.Get <CompoundConfig>(); _unitController = GameModel.Get <UnitController>(); _planetController = GameModel.Get <PlanetController>(); _message = new CompoundControlMessage(0, CompoundControlAction.ADD, false); _unitDefenseUpdateCommand = GameModel.Get <UnitDefenseUpdateCommand>(); }
// Use this for initialization void Awake() { _compoundConfig = GameConfig.Get <CompoundConfig>(); _compounds = new List <CompoundViewModel>(); for (int i = 0; i < _compoundConfig.Count; i++) { _compounds.Add(new CompoundViewModel(_compoundConfig[i])); } }
public void SetupCosmeticInformation(CompoundConfig model, DataTreeObject dataTreeParent) { ComponentModel[] componentModels = model.models; List <object> refs = new List <object>(); foreach (ComponentModel mdl in componentModels) { // Yes, there are cases where this is null. if (mdl.model?.getName() != null) { refs.Add(mdl.model.getName()); } } dataTreeParent.AddSimpleProperty(componentModels.Length + " model references", refs.ToArray(), SilkImage.Reference, SilkImage.Reference, false); }
public void HandleModelConfig(FileInfo sourceFile, ModelConfig baseModel, List <Model3D> modelCollection, DataTreeObject dataTreeParent = null, Transform3D globalTransform = null, Dictionary <string, dynamic> extraData = null) { // ModelConfigHandler.SetupCosmeticInformation(baseModel, dataTreeParent); CompoundConfig compound = (CompoundConfig)baseModel.implementation; SetupCosmeticInformation(compound, dataTreeParent); // NEW: Some stuff uses this trick to pick a specific model out of a compound // Parameters contain three key bits of data: // 1: Directs (short for Directives) -- These store the values that each option edits. // 2: Options -- These are the actual options you can pick, and contain a value for each direct that's been defined for this param // 3: Choice -- The currently selected option (or default option) ComponentModel[] componentModels = compound.models; SKAnimatorToolsProxy.IncrementEnd(componentModels.Length); foreach (ComponentModel model in componentModels) { ConfigReferenceUtil.HandleComponentModel(sourceFile, model, modelCollection, dataTreeParent, globalTransform, true, extraData); SKAnimatorToolsProxy.IncrementProgress(); } }
public void Init() { _compounds = GameConfig.Get <CompoundConfig>(); _planetController = GameModel.Get <PlanetController>(); }
private void Awake() { _compounds = GameConfig.Get <CompoundConfig>(); _compoundEquipMessage = new CompoundEquipMessage(0, Index); }
public void Init() { _unitController = GameModel.Get <UnitController>(); _compounds = GameConfig.Get <CompoundConfig>(); }
public void Init() { _debug = GameModel.Get <GameDebug>(); _compounds = GameConfig.Get <CompoundConfig>(); GameModel.HandleGet <PlanetModel>(OnPlanetModelChange); }
private void Start() { _compounds = GameConfig.Get <CompoundConfig>(); GameModel.HandleGet <PlanetModel>(OnPlanetChange); _compoundEquipMessage = new CompoundEquipMessage(0, 0, CompoundEquipAction.UNEQUIP); }