using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class operation : MonoBehaviour {

    Actions.the_action some_action;

    public Controller cntrlr;

    public Sprite unselected;
    public Sprite selected;
    public bool isSelected = false;

    public void Select()
    {
        GetComponent<Image>().sprite = selected;
    }
    public void UnSelect()
    {
        GetComponent<Image>().sprite = unselected;
    }

    private void Awake()
    {
        some_action = nothing;
    }

    public void set_action(ref Actions.the_action act)
    {
        some_action = act;
    }

    public void Set_new_action()
    {
        some_action = cntrlr.action_to_set;
    }

    public void Get_new_action()
    {
        cntrlr.action_to_set = some_action;
    }

    public void do_action()
    {
        some_action();

    }

    private void nothing()
    {

    }
}
