示例#1
0
    /** Hatch this kaiju. DOES NOT add it to the user metadata */

    /*public void hatch(OwnedEgg egg)
     * {
     *  if (_helpers == null) _helpers = new IdList(egg.Helpers);
     * }
     *
     * public bool isHatched()
     * {
     *  return _helpers != null;
     * } */

    /** Adds the friend user ID to the list of friends who helped this egg hatch,
     * if that friend does not already exist in that list. */
    public void addHelper(string friendUserId)
    {
        Debug.Log(_helpers.containsId(friendUserId));
        if (!_helpers.containsId(friendUserId))
        {
            _helpers.add(friendUserId);
        }
    }
示例#2
0
 /** Returns true if request already sent to friend, false otherwise.
  * Adds the friend user ID to the list of requests sent out */
 public bool addRequest(string friendUserId)
 {
     if (_requests.Contains(friendUserId))
     {
         return(false);
     }
     _requests.add(friendUserId);
     return(true);
 }