private void ReturnEnergyStatus() { foreach (var c in actionObjects) { if (c is ActionObject) { ActionObject obj = ((ActionObject)c); obj.Use(); obj.OnChangeEnergyHandler(obj.startConnectEnergy); } } }
public void ShockEffect(float time) { foreach (var c in actionObjects) { if (c is ActionObject) { ActionObject obj = ((ActionObject)c); obj.Use(); obj.startConnectEnergy = obj.ConnectEnergy; obj.OnChangeEnergyHandler(false); } } Invoke("ReturnEnergyStatus", time); }