Exemplo n.º 1
0
 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>();
 }
Exemplo n.º 2
0
 // 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]));
     }
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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();
            }
        }
Exemplo n.º 5
0
 public void Init()
 {
     _compounds        = GameConfig.Get <CompoundConfig>();
     _planetController = GameModel.Get <PlanetController>();
 }
Exemplo n.º 6
0
 private void Awake()
 {
     _compounds            = GameConfig.Get <CompoundConfig>();
     _compoundEquipMessage = new CompoundEquipMessage(0, Index);
 }
Exemplo n.º 7
0
 public void Init()
 {
     _unitController = GameModel.Get <UnitController>();
     _compounds      = GameConfig.Get <CompoundConfig>();
 }
Exemplo n.º 8
0
 public void Init()
 {
     _debug     = GameModel.Get <GameDebug>();
     _compounds = GameConfig.Get <CompoundConfig>();
     GameModel.HandleGet <PlanetModel>(OnPlanetModelChange);
 }
Exemplo n.º 9
0
 private void Start()
 {
     _compounds = GameConfig.Get <CompoundConfig>();
     GameModel.HandleGet <PlanetModel>(OnPlanetChange);
     _compoundEquipMessage = new CompoundEquipMessage(0, 0, CompoundEquipAction.UNEQUIP);
 }