Beispiel #1
0
    // Member Methods
    public void Start()
    {
        m_NaniteStorage = gameObject.GetComponent <CNaniteStorageBehaviour>();

        // Register for when the circuitry breaks/fixes
        m_CircuitryComp.EventComponentBreak  += HandleComponentStateChange;
        m_CircuitryComp.EventComponentFix    += HandleComponentStateChange;
        m_CalibratorComp.EventComponentBreak += HandleComponentStateChange;
        m_CalibratorComp.EventComponentFix   += HandleComponentStateChange;

        // Get the DUI of the power generator
        m_DUINaniteCapsule = m_DUIConsole.DUI.GetComponent <CDUINaniteCapsuleRoot>();
        m_DUINaniteCapsule.RegisterNaniteCapsule(gameObject);

        if (CNetwork.IsServer)
        {
            m_NaniteStorage.NaniteCapacity = m_MaxNaniteCapacity;
            m_NaniteStorage.StoredNanites  = 0;
        }
    }
Beispiel #2
0
	// Member Methods
	public void Start()
	{
		m_NaniteStorage = gameObject.GetComponent<CNaniteStorageBehaviour>();
		
		// Register for when the circuitry breaks/fixes
		m_CircuitryComp.EventComponentBreak += HandleComponentStateChange;
		m_CircuitryComp.EventComponentFix += HandleComponentStateChange;
		m_CalibratorComp.EventComponentBreak += HandleComponentStateChange;
		m_CalibratorComp.EventComponentFix += HandleComponentStateChange;
		
		// Get the DUI of the power generator
		m_DUINaniteCapsule = m_DUIConsole.DUI.GetComponent<CDUINaniteCapsuleRoot>();
		m_DUINaniteCapsule.RegisterNaniteCapsule(gameObject);

		if(CNetwork.IsServer)
		{
			m_NaniteStorage.NaniteCapacity = m_MaxNaniteCapacity;
			m_NaniteStorage.StoredNanites = 0;
		}
	}