Exemplo n.º 1
0
        public virtual Solar CreateSolar(ArchSolar obj)
        {
            Solar solar = new Solar(this, ++lastSolarID, obj);

            solars[solar.id] = solar;

            return(solar);
        }
Exemplo n.º 2
0
        public Solar(WorldController worldController, uint id, ArchSolar arch)
        {
            this.valid           = true;
            this.worldController = worldController;
            this.id           = id;
            this.components   = new List <SolarComponent>();
            this.controlPanel = new SolarControlPanel(this);

            CreateSolarComponents(arch);
        }
Exemplo n.º 3
0
        private void CreateSolarComponents(ArchSolar arch)
        {
            foreach (ArchSolarComponent compArch in arch.components)
            {
                components.Add(new SolarComponent(this, compArch));
            }

            rootComponent = GetComponentByID(Hash.FromString64("root_component"));

            if (rootComponent == null)
            {
                throw new Exception("Solar component doesnt contatin root component");
            }
        }