public IEnumerator UpdateUserBulletsRifle() { User user = Data.Usuario; rifle rifleClass = Data.UserRifle; int bullets = Convert.ToInt32(rifleClass.bulletsLeft + rifleClass.currentBullets); WWWForm form = new WWWForm(); form.AddField("slotid", rifleClass.idSlot); form.AddField("quantity", bullets); UnityWebRequest www = UnityWebRequest.Post("http://alienated.eastus2.cloudapp.azure.com:8080/inventory/update", form); yield return(www.SendWebRequest()); status = www.downloadHandler.text; if (status.Equals("Updated")) { print("Updated"); } else { print("Not Updated"); } }
public static void Main(string[] args) { Console.WriteLine(); Console.WriteLine("==== Stats Senjata ===="); Console.WriteLine(); Stats stats; stats = new smg(); stats.name(); stats.accurate(); stats.damage(); Console.WriteLine(); stats = new rifle(); stats.name(); stats.accurate(); stats.damage(); Console.WriteLine(); stats = new sniper(); stats.name(); stats.accurate(); stats.damage(); }
void RunToMap() { rifleClass = Data.UserRifle; gunClass = Data.UserGun; StartCoroutine(UpdateUserBulletsAK()); StartCoroutine(UpdateUserBulletsRifle()); StartCoroutine(UpdateUserConsumable()); Invoke("GoToMap", 1); audioSource.PlayOneShot(chickenSound); }
void YouWin() { rifleClass = Data.UserRifle; gunClass = Data.UserGun; StartCoroutine(UpdateUserBulletsAK()); StartCoroutine(UpdateUserBulletsRifle()); StartCoroutine(UpdateUserConsumable()); StartCoroutine(UpdateUserExp()); Invoke("GotoYouWin", time); }