Exemplo n.º 1
0
        private void FixedUpdate()
        {
            float dt = Time.fixedDeltaTime;

            if (m_PowerDrain > 0.0f)
            {
                Emitting = PowerConduit.DrainEnergy(gameObject, dt, true);
            }
        }
Exemplo n.º 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));
        }
Exemplo n.º 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();
        }
Exemplo n.º 4
0
 bool DrainEnergy(float amount, bool doIt)
 {
     return(PowerConduit.DrainEnergy(gameObject, amount, doIt));
 }