Exemple #1
0
        public GameObject CreateEmpty(string name, EntityStore store)
        {
            var gameObject = new GameObject(name, store);

            gameObject.AddComponent <Transform>();
            gameObject.Transform = gameObject.GetComponent <Transform>();
            return(gameObject);
        }
Exemple #2
0
        public GameObject Create(string name, Type[] types, EntityStore store)
        {
            var gameObject = CreateEmpty(name, store);

            foreach (var componentType in types)
            {
                gameObject.AddComponent(componentType);
            }
            return(gameObject);
        }
Exemple #3
0
 public GameObject Create(Type[] types, EntityStore store)
 {
     return(Create(GameObject.DefaultName, types, store));
 }
Exemple #4
0
 public GameObject CreateEmpty(EntityStore store)
 {
     return(CreateEmpty(GameObject.DefaultName, store));
 }