コード例 #1
0
 public void speedSliderChange()
 {
     speedometerSlider.Value = speedSlider.value;
     speedMultiplier         = speedSlider.value / 240f + 0.5f;
     OverallMasterController.Instance().speed = speedMultiplier;
     speedFill.fillAmount = speedSlider.value / 120;
 }
コード例 #2
0
    // On start run the correct help menu if it hasn't been run before
    void Start()
    {
        if (OverallMasterController.Instance().helpTank == false && Application.loadedLevelName == "Tank" && OverallMasterController.Instance().unlocked)
        {
            storeButton.isOn = true;
            OverallMasterController.Instance().helpTank = true;
        }
        if (OverallMasterController.Instance().helpUFO == false && Application.loadedLevelName == "RelativeJoystick" && OverallMasterController.Instance().unlocked)
        {
            storeButton.isOn = true;
            OverallMasterController.Instance().helpUFO = true;
        }
        if (OverallMasterController.Instance().helpHorse == false && Application.loadedLevelName == "Horse" && OverallMasterController.Instance().unlocked)
        {
            storeButton.isOn = true;
            OverallMasterController.Instance().helpHorse = true;
        }
        if (OverallMasterController.Instance().helpSportsCar == false && Application.loadedLevelName == "SportsCar")
        {
            storeButton.isOn = true;
            OverallMasterController.Instance().helpSportsCar = true;
        }
        if (OverallMasterController.Instance().comingFromUnlock == true && Application.loadedLevelName == "HomeScreen")
        {
            storeButton.isOn = true;
            OverallMasterController.Instance().comingFromUnlock = false;
        }

        help();
    }
コード例 #3
0
 public void Start()
 {
     speedSlider.value       = OverallMasterController.Instance().speed * 240f - 120f;
     speedMultiplier         = OverallMasterController.Instance().speed;
     speedometerSlider.Value = speedSlider.value;
     volumeSlider.value      = OverallMasterController.Instance().volume;
     volumeSliderChange();
 }
コード例 #4
0
 // Sets deviceStartPosition vector = to device acceleration vector when script is started
 void Start()
 {
     deviceStartPosition.Set(Input.acceleration.x, Input.acceleration.y, Input.acceleration.z);
     foodButton.isOn    = true;
     foodButton.enabled = true;
     speedMult          = OverallMasterController.Instance().speed;
     volumeMult         = OverallMasterController.Instance().volume;
     StartCoroutine(randomNeigh());
 }
コード例 #5
0
    // Manages home screen

    public void toggleLauncher()
    {
        if (OverallMasterController.Instance().launcherAccessory)
        {
            OverallMasterController.Instance().launcherAccessory = false;
        }
        else
        {
            OverallMasterController.Instance().launcherAccessory = true;
        }
    }
コード例 #6
0
 void Awake()
 {
     if (OverallMasterController.Instance().launcherAccessory)
     {
         launcherToggle.isOn = true;
     }
     else
     {
         launcherToggle.isOn = false;
     }
 }
コード例 #7
0
 private void isFullUnlocked()
 {
     if (StoreInventory.GetItemBalance("com.graham.wonderrush.unlock_full") == 1 && disabledButtons != null)
     {
         disabledButtons.SetActive(false);
         OverallMasterController.Instance().unlocked = true;
     }
     else
     {
     }
 }
コード例 #8
0
ファイル: openStore.cs プロジェクト: graham-hughes/WonderRush
 void Start()
 {
     if (OverallMasterController.Instance().unlocked)
     {
         unlockScreen.SetActive(false);
         MasterController.SetActive(true);
     }
     else
     {
         unlockScreen.SetActive(true);
         MasterController.SetActive(false);
     }
 }
コード例 #9
0
 public void volumeSliderChange()
 {
     OverallMasterController.Instance().volume = volumeSlider.value;
     soundFill.fillAmount = volumeSlider.value;
     if (volumeSlider.value == 0)
     {
         soundOn.enabled  = false;
         soundOff.enabled = true;
     }
     else
     {
         soundOn.enabled  = true;
         soundOff.enabled = false;
     }
 }
コード例 #10
0
    void Start()
    {
        if (OverallMasterController.Instance().launcherAccessory)
        {
            reloadLeft.SetActive(true);
            reloadRight.SetActive(true);
            reloadHelp.SetActive(true);
            productLink.SetActive(false);
        }
        else
        {
            reloadLeft.SetActive(false);
            reloadRight.SetActive(false);
            reloadHelp.SetActive(false);
            productLink.SetActive(true);
        }
        for (int n = 0; n < numPerSide; ++n)
        {
            historyL[n] = 10000;
            historyR[n] = 10000;
        }

        joystickRadius = Screen.width / 9;
        origin         = new Vector3(Screen.width / 5f, Screen.width / 5f, 0);
        joystickBackground.transform.position = origin;
        starSystemBackwards.Pause();
        starSystemBackwards.GetComponent <Renderer>().enabled = false;
        starSystemForwards.Pause();
        StartCoroutine(lightLoop());
        leftShot.emissionRate           = 0;
        rightShot.emissionRate          = 0;
        joystickKnob.transform.position = origin;
        speedMult  = OverallMasterController.Instance().speed;
        volumeMult = OverallMasterController.Instance().volume;


        foreach (piBotBo bot in piConnectionManager.Instance.BotsInState(PI.BotConnectionState.CONNECTED))
        {
            bot.cmd_poseSetGlobal(0, 0, -1 * (Mathf.PI * Mathf.PI) / 180, 0);
        }
    }
コード例 #11
0
    IEnumerator  robotTractorBeam()
    {
        foreach (piBotBo bot in piConnectionManager.Instance.BotsInState(PI.BotConnectionState.CONNECTED))
        {
            bot.cmd_playSound("ROBOT_05", theSoundDir, volumeMult);
            if (OverallMasterController.Instance().launcherAccessory)
            {
                bot.cmd_launch(1f);
            }
            bot.cmd_LEDTail(1);
            bot.cmd_LEDButtonMain(1);
            StopCoroutine(lightLoop());
            bitmap = new bool[] { true, true, true, true, true, true, true, true, true, true, true, true };
            yield return(new WaitForSeconds(0.3f));

            bot.cmd_LEDTail(0);
            bot.cmd_LEDButtonMain(0);
            laserToggle.isOn         = false;
            laserToggle.interactable = true;
        }
    }
コード例 #12
0
ファイル: openStore.cs プロジェクト: graham-hughes/WonderRush
 public void openStoreMenu()
 {
     OverallMasterController.Instance().comingFromUnlock = true;
 }