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");
        }
    }
Exemple #2
0
        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();
        }
Exemple #3
0
 void RunToMap()
 {
     rifleClass = Data.UserRifle;
     gunClass   = Data.UserGun;
     StartCoroutine(UpdateUserBulletsAK());
     StartCoroutine(UpdateUserBulletsRifle());
     StartCoroutine(UpdateUserConsumable());
     Invoke("GoToMap", 1);
     audioSource.PlayOneShot(chickenSound);
 }
Exemple #4
0
    void YouWin()
    {
        rifleClass = Data.UserRifle;
        gunClass   = Data.UserGun;
        StartCoroutine(UpdateUserBulletsAK());
        StartCoroutine(UpdateUserBulletsRifle());
        StartCoroutine(UpdateUserConsumable());
        StartCoroutine(UpdateUserExp());

        Invoke("GotoYouWin", time);
    }