Exemple #1
0
        private void FixedUpdate()
        {
            float dt = Time.fixedDeltaTime;

            if (m_PowerDrain > 0.0f)
            {
                Emitting = PowerConduit.DrainEnergy(gameObject, dt, true);
            }
        }
Exemple #2
0
        public void Disconnect(PowerConduit other)
        {
            if (other == null || other == this)
            {
                return;
            }

            m_Pcp.m_Connected.Remove(TwoDee.Proxied.GetGuid(other.gameObject));
            other.m_Pcp.m_Connected.Remove(TwoDee.Proxied.GetGuid(gameObject));
        }
Exemple #3
0
        public void Connect(PowerConduit other)
        {
            if (other == null || other == this)
            {
                return;
            }

            m_Pcp.m_Connected.Add(TwoDee.Proxied.GetGuid(other.gameObject));
            other.m_Pcp.m_Connected.Add(TwoDee.Proxied.GetGuid(gameObject));
            m_Pcp.UpdatePower();
            other.m_Pcp.UpdatePower();
        }
Exemple #4
0
 bool DrainEnergy(float amount, bool doIt)
 {
     return(PowerConduit.DrainEnergy(gameObject, amount, doIt));
 }