void Awake()
 {
     #region Singleton
     if (instance != null)
     {
         Debug.LogError("Multiple instances of " + this + " found");
     }
     instance = this;
     #endregion
 }
Exemple #2
0
    public bool levelGenerating;     // used to ensure that two levels aren't made at the same time

    void Start()
    {
        audioManager     = AudioManager.instance;
        cameraController = CameraController.instance;
        cannonController = CannonController.instance;
        cloudController  = CloudController.instance;
        inputManager     = InputManager.instance;
        prefabPlacer     = PrefabPlacer.instance;   // set up all pathways
        target           = Target.instance;
        terrainGenerator = TerrainGenerator.instance;
        UIManager        = UIManager.instance;
        windController   = WindController.instance;

        cloudController.StartCoroutine(cloudController.CloudSpammer()); // start the cloudSpammer coroutine
        StartGame();
    }
 private void OnEnable()
 {
     prefabPlacer = (PrefabPlacer)target;
 }