public void Init(HandPos pos, UnityAction callBack, HeartsGame game) { this.pos = pos; Button bttn = GetComponent <Button>(); bttn.onClick.AddListener(callBack); belongsToGame = game; }
public void Init(HandPos pos, UnityAction callBack, Player player) { this.pos = pos; Button bttn = GetComponent <Button>(); bttn.onClick.AddListener(callBack); ownedBy = player; }
/// <summary> /// gets HandPosition from file /// </summary> /// <returns>bool that indicates, if operation was successful</returns> private void GetHandPositionFromFile() { try { //get data from file, using StreamReader using (var sr = new StreamReader("hand_position.dat")) { _handPosition = (HandPos)Enum.Parse(typeof(HandPos), sr.ReadToEnd()); } } catch { HandPosition = HandPos.Between; } }