Exemple #1
0
 public int Add(int _count)
 {
     if (item == null)
     {
         return(0);
     }
     item.stackSize += _count;
     FDEventFactor.Broadcast <int, Item>(FDEvent.Refresh_Backpack, id, item);
     return(item.stackSize);
 }
Exemple #2
0
    private void ProcessNetMsg(NetMessage msg)
    {
        switch (msg.ProtocolId)
        {
        case Protocol.Protocol.MATCH_SUCCEED:
            FDEventFactor.Broadcast(FDEvent.Match_Succeed);
            break;    //TODO

        default: break;
        }
    }
Exemple #3
0
 // Start is called before the first frame update
 void Start()
 {
     FDEventFactor.AddListener(FDEvent.Match_Succeed, MatchSucceed);
 }
 public override void Open()
 {
     FDEventFactor.AddListener <int, Item>(FDEvent.Refresh_Backpack, Refresh);
     base.Open();
 }