Example #1
0
        /* 
		 * 
		 * GameObject's management
		 * 
		 */

        public void SpawnObject(string name, GameObject obj)
        {
            obj.Name = name;
            obj.Engine = this;
            obj.Enabled = true;
            obj.Id = totalObjCount++;
            Objects[name] = obj;
            dirtyObjects[obj] = 1;
            obj.Initialize();
        }
Example #2
0
 /*
  *
  * GameObject's management
  *
  */
 public void SpawnObject(string name, GameObject obj)
 {
     obj.name = name;
     obj.engine = this;
     obj.enabled = true;
     this.objects [name] = obj;
     obj.Initialize ();
     // force the rendering list to be rebuilt
     this.dirtyObjects = true;
 }