Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using UnityEngine;
- namespace Game.Utilities
- {
- public class ButtonLineDrawer : IRectLineDrawer
- {
- private readonly string _name;
- private readonly Action _action;
- public ButtonLineDrawer(string name, Action action)
- {
- _name = name;
- _action = action;
- }
- public void Draw(Rect position)
- {
- if (GUI.Button(position, _name))
- _action?.Invoke();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement