Ejemplo n.º 1
0
    //-------------------------------------

    // Start is called before the first frame update
    void Start()
    {
        //GameObject linkObjects = new GameObject();

        //Variables for getting objects
        //-------------------------------------
        getLevel  = GameObject.Find("GetLevel").GetComponent <GetLevel> ();
        levelPath = getLevel.levelName;
        Destroy(getLevel.gameObject);

        levelToLoad   = File.ReadAllText(levelPath);
        currentObject = JsonUtility.FromJson <GetObjects> (levelToLoad);

        //Spawning cube variables
        //-------------------------------------
        gateRot = new Quaternion(0, 0, 90, 0);

        beginPos       = this.transform.position;
        moveTile       = new Vector3(0, 0, 6);
        moveRow        = new Vector3(6, 0, 0);
        moveUp         = new Vector3(0, 6, 0);
        moveUpHalved   = new Vector3(0, 2, 0);
        moveDown       = new Vector3(0, -6, 0);
        moveDownHalved = new Vector3(0, -2, 0);
        //-------------------------------------
    }
Ejemplo n.º 2
0
    public void AunthenticatePlayerBttn()
    {
        new GameSparks.Api.Requests.AuthenticationRequest().
        SetUserName(Login.username).
        SetPassword(Login.password).
        Send((response) => {
            if (!response.HasErrors)
            {
                Debug.Log("Player Authenticated...");
                playerTextError.text = " ";
                GetLevel.getLevel();

                AudioTrack.PlayOneShot(success, 1.9F);
                print("Effect no.2 done well ");

                changeAudio = true;
            }
            else
            {
                /**Samira, add error messages similar to the ones you created**/


                /**Your code goes here**/


                Debug.Log("Error Authenticating Player...");

                AudioTrack.PlayOneShot(clip, 1.9F);
                print("Effect no.2 done well ");

                playerTextError.text  = "Not valid user ";
                playerTextError.color = Color.red;
            }
        });
    }
    public static void AunthenticatePlayerBttn(string username, string password, Text playerTextError)
    {
        new GameSparks.Api.Requests.AuthenticationRequest().
        SetUserName(username).
        SetPassword(password).
        Send((response) => {
            if (!response.HasErrors)
            {
                Debug.Log("Player Authenticated...");
                playerTextError.text = " ";
                GetLevel.getLevel();
            }
            else
            {
                /**Samira, add error messages similar to the ones you created**/


                /**Your code goes here**/
                Debug.Log("Error Authenticating Player...");

                playerTextError.text  = "Not valid user ";
                playerTextError.color = Color.red;
            }
        });
    }
Ejemplo n.º 4
0
 long On(GetLevel x) => level;
Ejemplo n.º 5
0
 long On(GetLevel x)
 {
     return(level);
 }