예제 #1
0
    void Start()
    {
        死            = SoundManager.Instance();
        soundOptions = SoundOptions.Instance();

        死.SetBGM(SoundManager.SFX.Main);
        死.PlayBGM();
    }
예제 #2
0
 void Start()
 {
     soundManager = SoundManager.Instance();
     if (soundManager == null)
     {
         Debug.LogError("Sound Manager not found.");
     }
     soundOptions = SoundOptions.Instance();
     if (soundOptions == null)
     {
         Debug.LogError("Sound Options not found.");
     }
 }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        死            = SoundManager.Instance();
        soundOptions = SoundOptions.Instance();

        死.SetBGM(SoundManager.SFX.Farm);
        死.PlayBGM();

        maintainedDistance = (minZoomDistance + maxZoomDistance) / 2f;
        if (focusObject != null)
        {
            idealFocus = focusObject.transform.position + new Vector3(0, startingYOffset, 0);
        }
        resetCamera();
    }
예제 #4
0
        void Start()
        {
            死            = SoundManager.Instance();
            soundOptions = SoundOptions.Instance();

            死.SetBGM(SoundManager.SFX.Race);
            死.PlayBGM();


            winScreen.SetActive(false);
            gliders = new GameObject[numAI + 1];
            Glider glider = GameObject.Instantiate(gliderPrefab, start.position - start.forward * 2, start.rotation).GetComponent <Glider>();

            glider.setAgent(new PlayerAgent(glider));
            //glider.transform.Find("Main Camera").gameObject.SetActive(true);
            GameObject cam = GameObject.Instantiate(camPrefab, glider.transform.position, glider.transform.rotation);

            cam.GetComponent <CameraControl>().target = glider.transform;
            glider.indicator = indicator;
            glider.setRaceStats(SelectedRaceParameters.wingspan, SelectedRaceParameters.dragMultiplier, SelectedRaceParameters.mass, SelectedRaceParameters.controlAuthority);
            glider.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezePosition;
            gliders[0] = glider.gameObject;

            float aiMinSpan = Mathf.Max(SelectedRaceParameters.wingspan, RaceStatsCalculator.MIN_WINGSPAN);
            float aiMaxSpan = Mathf.Min(SelectedRaceParameters.wingspan, RaceStatsCalculator.MAX_WINGSPAN);
            float aiMinDrag = Mathf.Max(SelectedRaceParameters.wingspan, RaceStatsCalculator.MIN_DRAG_MULT);
            float aiMaxDrag = Mathf.Min(SelectedRaceParameters.wingspan, RaceStatsCalculator.MAX_DRAG_MULT);
            float aiMinMass = Mathf.Max(SelectedRaceParameters.wingspan, RaceStatsCalculator.MIN_MASS);
            float aiMaxMass = Mathf.Min(SelectedRaceParameters.wingspan, RaceStatsCalculator.MAX_MASS);
            float aiMinCtrl = Mathf.Max(SelectedRaceParameters.wingspan, RaceStatsCalculator.MIN_AUTHORITY);
            float aiMaxCtrl = Mathf.Min(SelectedRaceParameters.wingspan, RaceStatsCalculator.MAX_AUTHORITY);

            for (int i = 0; i < numAI; i++)
            {
                glider = GameObject.Instantiate(gliderPrefab, start.position + start.right * (i + 1) * 3, start.rotation).GetComponent <Glider>();
                glider.setAgent(new AIAgent(glider, goal.position));
                glider.setRaceStats(Random.Range(aiMinSpan, aiMaxSpan), Random.Range(aiMinDrag, aiMaxDrag), Random.Range(aiMinMass, aiMaxMass), Random.Range(aiMinCtrl, aiMaxCtrl));
                glider.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezePosition;
                gliders[i + 1] = glider.gameObject;
            }
        }
예제 #5
0
    // Start is called before the first frame update
    void Start()
    {
        nextButton.onClick.AddListener(delegate { selectNext(); });
        lastButton.onClick.AddListener(delegate { selectPrev(); });

        listItems = new List <StackSelectionListItem>();

        henList         = HenInfoPersist.loadList();
        currentHenIndex = 0;
        updateSelection();

        死            = SoundManager.Instance();
        soundOptions = SoundOptions.Instance();
        if (Random.Range(0.0f, 1.0f) > 0.5)
        {
            死.SetBGM(SoundManager.SFX.chickenMarch);
            死.PlayBGM();
        }
        else
        {
            死.SetBGM(SoundManager.SFX.chickenMarchDubstep);
            死.PlayBGM();
        }
    }