コード例 #1
0
ファイル: Loader.cs プロジェクト: WamWooWam/TheSims3Mobile
        private static void loadObject3D(
            Object3D @object,
            ref DataInputStream @in,
            ref List <Object3D> objects,
            ref List <Object3D> rootObjects)
        {
            int userID = Loader.readIntLE(ref @in);

            @object.setUserID(userID);
            int num1 = Loader.readIntLE(ref @in);

            for (int index = 0; index < num1; ++index)
            {
                AnimationTrack reference = (AnimationTrack)Loader.getReference(ref @in, ref objects, ref rootObjects);
                @object.addAnimationTrack(reference);
            }
            int num2 = Loader.readIntLE(ref @in);

            for (int index = 0; index < num2; ++index)
            {
                Loader.readIntLE(ref @in);
                sbyte[] b = new sbyte[Loader.readIntLE(ref @in)];
                @in.readFully(b);
            }
        }
コード例 #2
0
 public void addAnimationTrack(AnimationTrack animationTrack)
 {
     if (this.m_animationTracks == null)
     {
         this.m_animationTracks = new List <object>();
     }
     this.m_animationTracks.Add((object)animationTrack);
 }
コード例 #3
0
        protected virtual void duplicateTo(ref Object3D ret)
        {
            ret.setUserID(this.getUserID());
            int animationTrackCount = this.getAnimationTrackCount();

            for (int index = 0; index < animationTrackCount; ++index)
            {
                AnimationTrack animationTrack = this.getAnimationTrack(index);
                ret.addAnimationTrack(animationTrack);
            }
        }
コード例 #4
0
        public int animate(int time)
        {
            int num = this.animateReferences(time);

            for (int index = this.getAnimationTrackCount() - 1; index >= 0; --index)
            {
                AnimationTrack animationTrack = this.getAnimationTrack(index);
                animationTrack.getController();
                this.updateAnimationProperty(animationTrack.getTargetProperty(), animationTrack.getSampleValue(time));
            }
            this.postAnimate(time);
            return(num);
        }
コード例 #5
0
ファイル: Loader.cs プロジェクト: WamWooWam/TheSims3Mobile
        private static object loadAnimationTrack(
            ref DataInputStream @in,
            ref List <Object3D> objectList,
            ref List <Object3D> rootObjectList)
        {
            AnimationTrack animationTrack = new AnimationTrack();

            Loader.loadObject3D((Object3D)animationTrack, ref @in, ref objectList, ref rootObjectList);
            KeyframeSequence    reference1 = (KeyframeSequence)Loader.getReference(ref @in, ref objectList, ref rootObjectList);
            AnimationController reference2 = (AnimationController)Loader.getReference(ref @in, ref objectList, ref rootObjectList);
            int property = Loader.readIntLE(ref @in);

            animationTrack.setKeyframeSequence(reference1);
            animationTrack.setProperty(property);
            animationTrack.setController(reference2);
            return((object)animationTrack);
        }
コード例 #6
0
 public void removeAnimationTrack(AnimationTrack animationTrack)
 {
     this.m_animationTracks.Remove((object)animationTrack);
 }