Beispiel #1
0
 public void setGameObject(GameObject obj)
 {
     meshCollection      = new LoziMeshCollection(obj);
     textureCollection   = new LoziTextureCollection(obj);
     materialCollection  = new LoziMaterialCollection(obj);
     animationCollection = new LoziAnimationCollection(obj);
     target = new LoziObject(obj, ((sceneObject == obj) ? ObjectType.Scene : ObjectType.None));
 }
Beispiel #2
0
 public void setParent(LoziObject parent)
 {
     this.parent = parent;
     if (type == ObjectType.SkinnedMesh && this.parent.type == ObjectType.AnimationObject)
     {
         if (this.parent.animation != null)
         {
             this.animation = this.parent.animation;
             this.animation.isSkinAnimation = true;
             this.parent.animation          = null;
         }
     }
 }
Beispiel #3
0
        // Gets child by id
        public LoziObject getById(int id)
        {
            LoziObject returnObj = null;

            if (id == objectId)
            {
                returnObj = this;
            }
            else
            {
                for (int num = 0; num < children.Count; num++)
                {
                    returnObj = children[num].getById(id);
                    if (returnObj != null)
                    {
                        break;
                    }
                }
            }
            return(returnObj);
        }