Example #1
0
 protected virtual void Awake()
 {
     if (m_Singleton != null)
     {
         Destroy(gameObject);
         return;
     }
     m_Singleton        = this;
     m_Blocks           = new Dictionary <Vector3, Block> ();
     m_BackgroundBlocks = new Dictionary <Vector3, BackgroundBlock> ();
     m_BackgroundLayers = new BackgroundLayer[m_Settings.BackgroundLayers.Length];
     for (int i = 0; i < m_Settings.BackgroundLayers.Length; i++)
     {
         m_BackgroundLayers [i] = m_Settings.BackgroundLayers [i];
     }
     GameManager.OnReset += Reset;
 }
Example #2
0
        protected virtual void Awake()
        {
            m_Character = GameObject.FindObjectOfType <Character>();
            if (m_Singleton != null)
            {
                Destroy(gameObject);
                return;
            }
            m_Singleton        = this;
            m_Blocks           = new Dictionary <Vector3, Block> ();
            m_BackgroundBlocks = new Dictionary <Vector3, BackgroundBlock> ();
            m_BackgroundLayers = new BackgroundLayer[m_Settings.BackgroundLayers.Length];
            for (int i = 0; i < m_Settings.BackgroundLayers.Length; i++)
            {
                m_BackgroundLayers [i] = m_Settings.BackgroundLayers [i];
            }
            GameManager.OnReset += Reset;

            Debug.Log(Settings.MiddleBlocks[0].name);
        }
Example #3
0
 protected virtual void OnDestroy()
 {
     m_Singleton = null;
 }
Example #4
0
 public virtual void PostGenerate(TerrainGenerator generator)
 {
 }
Example #5
0
 public virtual void OnRemove(TerrainGenerator generator)
 {
 }