Esempio n. 1
0
 // Start is called before the first frame update
 void Awake()
 {
     Instance = this;
     snowSystem.Stop();
     rainSystem.Stop();
     rainSystem2.Stop();
 }
Esempio n. 2
0
 protected override void Start()
 {
     base.Start();
     renderers = GetComponentsInChildren <Renderer> (true);
     rain      = FindObjectOfType <RainController> ();
     numBlocks = renderers.Length;
     type      = RTS.ResourceType.Money;
     InvokeRepeating("Regenerate", 5, regenerateTime);
 }
Esempio n. 3
0
    void Start()
    {
        rainModule = rainParticle.emission;
        scriptUI   = GameObject.FindObjectOfType(typeof(UIControl)) as UIControl;
        rainScript = GameObject.FindObjectOfType(typeof(RainController)) as RainController;

        diamonds = -1;
        emeralds = -1;
        rubys    = -1;
    }
Esempio n. 4
0
 void Awake()
 {
     if (Instance != null && Instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         Instance = this;
     }
 }
Esempio n. 5
0
 private void Awake()
 {
     if (rainControllerInstance != null && rainControllerInstance != this)
     {
         if (gameObject != null)
         {
             Destroy(gameObject);
         }
         return;
     }
     rainControllerInstance = this;
 }
Esempio n. 6
0
    // Use this for initialization
    void Start()
    {
        Instance = this;

        ParticleSystem = Particles.GetComponent <ParticleSystem>();

        // UserMesh = GameObject.Find("UserMesh");
        // UserMeshFilter = UserMesh.GetComponent<MeshFilter>();

        //AirSticks.Right.NoteOn += HoneOn;
        //AirSticks.Right.NoteOff += HoneOff;
        AirSticks.Right.NoteOn += DoHitOut;
    }
Esempio n. 7
0
 void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance                   = this;
         myParticleSystem            = GetComponent <ParticleSystem>();
         emissionModule              = myParticleSystem.emission;
         mainModule                  = myParticleSystem.main;
         emissionModule.rateOverTime = initialAmount;
     }
 }
Esempio n. 8
0
    void Start()
    {
        Screen.orientation = ScreenOrientation.LandscapeLeft;

        _currentSceneState = SceneState.Unfavorable;

        _dayNightCycleController   = new DayNightCycleController();
        _windController            = new WindController();
        _cloudController           = new CloudController(StartCoroutine);
        _rainController            = new RainController();
        _temperatureController     = new TemperatureController(StartCoroutine, _dayNightCycleController);
        _waterController           = new WaterController();
        _terrainController         = new TerrainController(StartCoroutine);
        _snowController            = new SnowController();
        _treeGrowthStateController = new TreeGrowthStateController(StartCoroutine, _windController.UpdateTreeWindForceOnGrow);

        _sceneRestarted = false;
    }
Esempio n. 9
0
    // Use this for initialization
    void Start()
    {
        Instance = this;

        ToonLit        = Resources.Load <UnityEngine.Material>("ToonLit");
        BlackOcclusion = Resources.Load <UnityEngine.Material>("BlackOcclusion");
        Wireframe      = Resources.Load <UnityEngine.Material>("Rainbow Wireframe");
        Basic          = Resources.Load <UnityEngine.Material>("Basic");
        Pink           = Resources.Load <UnityEngine.Material>("Pink");
        LinePattern    = Resources.Load <UnityEngine.Material>("LinePattern");
        GranOutline    = Resources.Load <UnityEngine.Material>("GranOutline");

        BlackBlockout = GameObject.Find("BlackBlockout").GetComponent <BlockoutController>();
        WhiteBlockout = GameObject.Find("WhiteBlockout").GetComponent <BlockoutController>();

        TrackerSceneOutputQuadRenderer        = TrackerSceneOutputQuad.GetComponent <Renderer>();
        TrackerSceneFlippedOutputQuadRenderer = TrackerSceneFlippedOutputQuad.GetComponent <Renderer>();

        ParticleSceneObject    = GameObject.Find("ParticleScene");
        RainParticlesObject    = GameObject.Find("RainParticles");
        RainParticleController = GameObject.Find("RainParticleController").GetComponent <RainController>();

        foreach (InputDevice inputDevice in InputDevice.InstalledDevices)
        {
            if (inputDevice.Name.ToLower().Equals(DeviceName.ToLower()))
            {
                InputDevice = inputDevice;
                break;
            }
        }
        if (InputDevice != null)
        {
            InputDevice.Open();
            InputDevice.StartReceiving(null);
            InputDevice.NoteOn += RouteNoteOn;

            InputDevice.NoteOn  += InformationMonitor.Instance.MidiNoteOn;
            InputDevice.NoteOff += InformationMonitor.Instance.MidiNoteOff;

            Debug.Log("Opened MIDI Device");
        }
    }