// Member Properties // Member Methods public void Start() { m_PropulsionGenerator = gameObject.GetComponent <CPropulsionGeneratorBehaviour>(); // Register for changes in mechanical health m_MechanicalComponent1.EventHealthChange += HandleMechanicalHealthChange; m_MechanicalComponent2.EventHealthChange += HandleMechanicalHealthChange; // Get the DUI of the power generator m_DUIPropulsionRoot = m_DUIConsole.DUI.GetComponent <CDUIPropulsionEngineRoot>(); m_DUIPropulsionRoot.RegisterPropulsionEngine(gameObject); if (CNetwork.IsServer) { // Set the generation rate m_PropulsionGenerator.PropulsionForce = m_MaxPropulsion; m_PropulsionGenerator.PropulsionPotential = m_MaxPropulsion; } // Set the cubemap for the children foreach (Renderer r in GetComponentsInChildren <Renderer>()) { r.material.SetTexture("_Cube", transform.parent.GetComponent <CModulePortInterface>().CubeMapSnapshot); } }
// Member Properties // Member Methods public void Start() { m_PropulsionGenerator = gameObject.GetComponent<CPropulsionGeneratorBehaviour>(); // Register for changes in mechanical health m_MechanicalComponent1.EventHealthChange += HandleMechanicalHealthChange; m_MechanicalComponent2.EventHealthChange += HandleMechanicalHealthChange; // Get the DUI of the power generator m_DUIPropulsionRoot = m_DUIConsole.DUI.GetComponent<CDUIPropulsionEngineRoot>(); m_DUIPropulsionRoot.RegisterPropulsionEngine(gameObject); if(CNetwork.IsServer) { // Set the generation rate m_PropulsionGenerator.PropulsionForce = m_MaxPropulsion; m_PropulsionGenerator.PropulsionPotential = m_MaxPropulsion; } // Set the cubemap for the children foreach(Renderer r in GetComponentsInChildren<Renderer>()) { r.material.SetTexture("_Cube", transform.parent.GetComponent<CModulePortInterface>().CubeMapSnapshot); } }