示例#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);
 }
示例#2
0
    private void ProcessNetMsg(NetMessage msg)
    {
        switch (msg.ProtocolId)
        {
        case Protocol.Protocol.MATCH_SUCCEED:
            FDEventFactor.Broadcast(FDEvent.Match_Succeed);
            break;    //TODO

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