Exemplo n.º 1
0
        public GameObject()
        {
            Transform                = new Transform();
            Children                 = new ListMAQ <GameObject>();
            Components               = new ListMAQ <Component>();
            Children.BeforeAdding   += ChildrenOnBeforeAdding;
            Components.BeforeAdding += ComponentsOnBeforeAdding;

            Components.Add(Transform);
        }
Exemplo n.º 2
0
 private void ChildrenOnBeforeAdding(ListMAQ <GameObject> collection, GameObject newItem)
 {
     newItem.Parent = this;
     newItem.Game   = Game;
 }
Exemplo n.º 3
0
 private void ComponentsOnBeforeAdding(ListMAQ <Component> collection, Component newItem)
 {
     newItem.GameObject = this;
 }