private void FixedUpdate() { float dt = Time.fixedDeltaTime; if (m_PowerDrain > 0.0f) { Emitting = PowerConduit.DrainEnergy(gameObject, dt, true); } }
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)); }
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(); }
bool DrainEnergy(float amount, bool doIt) { return(PowerConduit.DrainEnergy(gameObject, amount, doIt)); }