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