示例#1
0
    public void Init(HandPos pos, UnityAction callBack, HeartsGame game)
    {
        this.pos = pos;

        Button bttn = GetComponent <Button>();

        bttn.onClick.AddListener(callBack);

        belongsToGame = game;
    }
示例#2
0
    public void Init(HandPos pos, UnityAction callBack, Player player)
    {
        this.pos = pos;

        Button bttn = GetComponent <Button>();

        bttn.onClick.AddListener(callBack);

        ownedBy = player;
    }
示例#3
0
 /// <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;
     }
 }