Esempio n. 1
0
 public static void Destroy(GameObject gameObject)
 {
     gameObject.taggedForDestruction = true;
     for (int i = 0; i < gameObject._components.Count; i++)
     {
         gameObject._components[i].enabled = false;
         gameObject._components[i].OnDestroy();
     }
     gameObject._components = null;
 }
Esempio n. 2
0
        protected override void LoadContent()
        {
            spriteBatch = new SpriteBatch(GraphicsDevice);
            Initializer.Initialize(); //Initialize Everything

            mainCamera = new GameObject("Main Camera");
            mainCamera.AddComponent(typeof(Camera));
        }