Esempio n. 1
0
    // Keyboard Input for Debuging
    void Update()
    {
        if (Input.GetKeyUp("h"))
        {
            Debug.Log("Place");
            objectGridPlacement.UIPlaceObjectOnGrid();
        }

        if (Input.GetKeyUp("j"))
        {
            Debug.Log("Not Place");
            objectGridPlacement.UISetObjectOnGridBack();
        }

        if (Input.GetKeyUp("k"))
        {
            Debug.Log("Rotate");
            objectGridPlacement.UIRotateObjectOnGrid();
        }

        if (Input.GetKeyUp("l"))
        {
            Debug.Log("Delete");
            objectGridPlacement.UIRemoveObjectOnGrid();
        }

        if (Input.GetKeyUp("v"))
        {
            Debug.Log("Activate UI State");
            stateChange.ActivateUIState();
        }

        if (Input.GetKeyUp("b"))
        {
            Debug.Log("Activate Bar  State");
            stateChange.ActivateBarState();
        }

        if (Input.GetKeyUp("n"))
        {
            Debug.Log("Activate Build State");
            stateChange.ActivateBuildState();
        }

        if (Input.GetKeyUp("m"))
        {
            Debug.Log("Activate Space State");
            stateChange.ActivateSpaceState();
        }


        if (Input.GetKeyDown("space"))
        {
            stateChange.ActivateBarState();
            objectGridInstantiate.SpawnNewObjectWithID(4, 0, 0);
        }



        if (Input.GetKeyDown("a"))
        {
            objectGridInstantiate.LoadObjects();
        }

        if (Input.GetKeyDown("s"))
        {
            objectGridInstantiate.EmptyObjectGrid();
        }
    }