Exemple #1
0
        protected void OnUpdateResourceAmount(SocketIOEvent e)
        {
            UpdateResourceAmountEvent updateResourceAmountEvent = JsonConvert.DeserializeObject <UpdateResourceAmountEvent>(e.data.ToString());

            starsList[updateResourceAmountEvent.starName].resourceList[updateResourceAmountEvent.resourceName].amount = updateResourceAmountEvent.newAmount;
            eventManager.DispatchEvent <UpdateResourceAmountEvent>(updateResourceAmountEvent);
        }
 protected void OnUpdateResourceAmount(UpdateResourceAmountEvent e)
 {
     if (e.resourceName == resourceSlot.name)
     {
         resourceSlot.amount = e.newAmount;
         amountText.text     = e.newAmount.ToString();
     }
 }