Ejemplo n.º 1
0
        public void SendDeleteGoods(string status, string playerId)
        {
            var data    = new CollectionGoods(playerId, 0, 0, 0);
            var message = new Message("0330" + status, data);
            var str     = JsonConvert.SerializeObject(message);

            ws.Send(str);
        }
Ejemplo n.º 2
0
        public void SendUpdateGoods(string status, string playerId, int unicoin, int cosmostone, int oxygentank)
        {
            var data    = new CollectionGoods(playerId, unicoin, cosmostone, oxygentank);
            var message = new Message("0340" + status, data);
            var str     = JsonConvert.SerializeObject(message);

            ws.Send(str);
        }
Ejemplo n.º 3
0
        public void CommitGoods(CollectionGoods data)
        {
            CurrentPlayerData.unicoin    = data.uniCoin;
            CurrentPlayerData.cosmostone = data.cosmoStone;
            CurrentPlayerData.oxygentank = data.oxygenTank;

            if (Common.StateBar.Instance != null)
            {
                Common.StateBar.Instance.UpdateState();
            }
        }