Exemple #1
0
    public void Update()
    {
        //Just add a jump if up is pressed
        if (ArcadeKeymap.player1.up.isDown)
        {
            jumps.Add(new Jump {
                time = Time.time, randNum = Random.value
            });
        }

        //If the user has pressed the a key, then push data
        //to firebase
        if (ArcadeKeymap.player1.A.isDown)
        {
            //Just push the data
            FirebaseManager.PushList <Jump>(firebaseSettings, jumps, (firebase, snapshot) =>
            {
                //Log the response
                Debug.Log("<b>response:</b> " + snapshot.RawJson);
            });
        }

        //Has escape been pressed? If so.. then exit
        if (ArcadeKeymap.player1.buttonExit.isDown)
        {
            ArcadeGame.exit();
        }
    }