private void Press(object sender, MoveEventArgs e) { Pushed = true; OnPress?.Invoke(this, Color); GateBehavior.SendMessage(GateBehavior.GateMsg.Open, Color); pressingButton = sender; }
private void Unpress(object sender, MoveEventArgs e) { Pushed = false; OnUnpress?.Invoke(this, Color); GateBehavior.SendMessage(GateBehavior.GateMsg.Close, Color); pressingButton = null; }
private void OnDestroy() { TileMovingObjectScript.MoveableMoving -= Spongebob_PlayerPositionChanging; GateBehavior.SendMessage(GateBehavior.GateMsg.Close, Color); }