Beispiel #1
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 #2
0
        public LoziAnimationCollection(GameObject obj)
        {
            animationObjects = new List <LoziAnimation>();

            foreach (Animation animation in obj.GetComponentsInChildren <Animation>())
            {
                if (animation.GetClipCount() > 0)
                {
                    LoziAnimation anm = hasInArray(animation);
                    if (anm != null)
                    {
                        anm.checkAndAddClips(animation);
                    }
                    else
                    {
                        animationObjects.Add(new LoziAnimation(animation.gameObject));
                    }
                }
            }
        }
Beispiel #3
0
 //sets component of type if exists
 private void setComponents()
 {
     if (LoziMesh.hasMesh(obj))
     {
         mesh = LoziExporter.instance.meshCollection.getMeshByGameObject(obj);
     }
     if (LoziMaterial.hasMaterial(obj))
     {
         material = LoziExporter.instance.materialCollection.getMaterialByGameObject(obj);
     }
     if (LoziCamera.hasCamera(obj))
     {
         camera = new LoziCamera(obj);
     }
     if (LoziLight.hasLight(obj))
     {
         light = new LoziLight(obj);
     }
     if (LoziAnimation.hasAnimation(obj))
     {
         animation = LoziExporter.instance.animationCollection.getAnimationByGameObject(obj);
     }
 }