// Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Q) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Square)))
        {
            Spawn();
        }

        if (Input.GetKeyDown(KeyCode.E) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            clear();
        }
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Q) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            ChangeLanguage();
        }

        if (Input.GetKeyDown(KeyCode.E) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Square)))
        {
            ShowSubtitle();
        }
    }
Beispiel #3
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.P) || Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
     {
         if (FindObjectOfType <KS_CharacterController>().enabled)
         {
             FindObjectOfType <KS_CharacterController>().enabled = false;
         }
         else
         {
             FindObjectOfType <KS_CharacterController>().enabled = true;
         }
     }
 }
Beispiel #4
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.N) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            map.useMiniMap = !map.useMiniMap;

            if (map.MiniMapActive && !map.useMiniMap && !map.MapActive)
            {
                map.DisableMinimap();
                mapContainer.SetActive(false);
            }
            if (!map.MapActive && map.useMiniMap)
            {
                map.EnableMinimap();
                mapContainer.SetActive(true);
            }
        }
    }
Beispiel #5
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.F) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            ResetObjects();
        }

        if (Input.GetKeyDown(KeyCode.Q) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Square)))
        {
            Save();
        }

        if (Input.GetKeyDown(KeyCode.E) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.X)))
        {
            Load();
        }

        if (Input.GetMouseButtonDown(0) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.R2)))
        {
            FindObjectOfType <updateBulletPoint>().Fire();
        }
    }
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Q) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Square)))
        {
            Spawn();
        }

        if (Input.GetKeyDown(KeyCode.F) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            ClearPool();
        }

        string text = "";

        for (int i = 0; i < spawnObjects.Length; i++)
        {
            KS_IPoolObject o = spawnObjects[i].GetComponent <KS_IPoolObject>();

            text += o.PoolSettings().tag + ": Active in scene (" + GetAmountOfType(o.PoolSettings().tag)
                    + ") ---- In pool (" + pool.GetAmountOfType(o.PoolSettings().tag) + ")\n";
        }

        wallText.text = text;
    }
Beispiel #7
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.Share)))
        {
            shareB.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            shareB.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.TouchPad)))
        {
            touchpad.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            touchpad.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.Options)))
        {
            options.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            options.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            triangle.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            triangle.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.Circle)))
        {
            circle.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            circle.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.X)))
        {
            x.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            x.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.Square)))
        {
            square.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            square.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.Home)))
        {
            home.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            home.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.L1)))
        {
            leftButton.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            leftButton.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.L3)))
        {
            leftStick.item.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            leftStick.item.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.R1)))
        {
            rightButton.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            rightButton.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (Input.GetKey(KS_Input.DS4ButtonToKey(DS4KeyCode.R3)))
        {
            rightStick.item.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            rightStick.item.GetComponent <Renderer>().material.color = defaultCol;
        }

        // sticks


        Vector3 lsPos = leftStick.startPos;

        lsPos.x += leftStick.moveAmmount * -KS_Input.GetDS4Axis(DS4Axis.LeftStickX);
        lsPos.y += leftStick.moveAmmount * KS_Input.GetDS4Axis(DS4Axis.LeftStickY);

        leftStick.item.transform.position = lsPos;

        Vector3 rsPos = rightStick.startPos;

        rsPos.x += rightStick.moveAmmount * KS_Input.GetDS4Axis(DS4Axis.RightStickX);
        rsPos.y += rightStick.moveAmmount * -KS_Input.GetDS4Axis(DS4Axis.RightStickY);

        rightStick.item.transform.position = rsPos;

        Vector3 ltPos = leftTrigger.startPos;

        ltPos.y += leftTrigger.moveAmmount * KS_Input.GetDS4Axis(DS4Axis.L2);

        leftTrigger.item.transform.position = ltPos;

        Vector3 rtPos = rightTrigger.startPos;

        rtPos.y += rightTrigger.moveAmmount * KS_Input.GetDS4Axis(DS4Axis.R2);

        rightTrigger.item.transform.position = rtPos;

        // dpad

        if (KS_Input.GetDS4Axis(DS4Axis.DPadX) < -0.9)
        {
            dPadLeft.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            dPadLeft.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (KS_Input.GetDS4Axis(DS4Axis.DPadX) > 0.9)
        {
            dPadRight.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            dPadRight.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (KS_Input.GetDS4Axis(DS4Axis.DPadY) < -0.9)
        {
            dPadDown.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            dPadDown.GetComponent <Renderer>().material.color = defaultCol;
        }

        if (KS_Input.GetDS4Axis(DS4Axis.DPadY) > 0.9)
        {
            dpadUp.GetComponent <Renderer>().material.color = clickColour;
        }
        else
        {
            dpadUp.GetComponent <Renderer>().material.color = defaultCol;
        }
    }
Beispiel #8
0
    // Update is called once per frame
    void Update()
    {
        if (KS_Input.GetDS4Axis(DS4Axis.DPadX) < 0 || Input.GetKeyDown(KeyCode.Alpha1))
        {
            if (!dpadL)
            {
                dpadL = true;
                ResetTimeScale();
            }
        }
        else
        {
            dpadL = false;
        }

        if (KS_Input.GetDS4Axis(DS4Axis.DPadX) > 0 || Input.GetKeyDown(KeyCode.Alpha2))
        {
            if (!dpadR)
            {
                dpadR = true;
                IncreaseTimeScale();
            }
        }
        else
        {
            dpadR = false;
        }

        if (KS_Input.GetDS4Axis(DS4Axis.DPadY) < 0 || Input.GetKeyDown(KeyCode.Alpha4))
        {
            if (!dpadD)
            {
                dpadD = true;
                AddHour();
            }
        }
        else
        {
            dpadD = false;
        }

        if (KS_Input.GetDS4Axis(DS4Axis.DPadY) > 0 || Input.GetKeyDown(KeyCode.Alpha3))
        {
            if (!dpadU)
            {
                dpadU = true;
                QuickCycle();
            }
        }
        else
        {
            dpadU = false;
        }

        if (Input.GetKeyDown(KeyCode.Alpha5) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.X)))
        {
            ResetLongLat();
        }

        if (Input.GetKeyDown(KeyCode.Alpha6) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Square)))
        {
            SetLongLatFinland();
        }

        if (Input.GetKeyDown(KeyCode.Alpha7) || KS_Input.GetKeyDown(KS_Input.DS4ButtonToKey(DS4KeyCode.Triangle)))
        {
            SetLongLatEquator();
        }
    }