コード例 #1
0
        public void LoadFromFile()
        {
            FileStream   FS = new FileStream("Content/Animations/" + AnimationPath + ".pea", FileMode.Open, FileAccess.Read);
            BinaryReader BR = new BinaryReader(FS);

            LoopStart = BR.ReadInt32();
            LoopEnd   = BR.ReadInt32();

            ScreenWidth  = BR.ReadInt32();
            ScreenHeight = BR.ReadInt32();

            ListAnimationLayer = new AnimationLayerHolder();
            int ListAnimationLayerCount = BR.ReadInt32();

            for (int L = 0; L < ListAnimationLayerCount; L++)
            {
                AnimationLayer NewAnimationLayer = new AnimationLayer(this, "");
                NewAnimationLayer.LoadLayer(BR, Content, DicTimeline);
                ListAnimationLayer.Add(NewAnimationLayer);
            }

            GameEngineLayer NewGameEngineLayer = new GameEngineLayer(this);

            NewGameEngineLayer.LoadLayer(BR, Content, DicTimeline);
            ListAnimationLayer.EngineLayer = NewGameEngineLayer;

            FS.Close();
            BR.Close();
        }
コード例 #2
0
        protected void UpdateFrom(AnimationClass Other)
        {
            sprTopLeftAttack  = Other.sprTopLeftAttack;
            sprTopLeftCounter = Other.sprTopLeftCounter;
            sprTopLeftDefense = Other.sprTopLeftDefense;
            sprTopLeftEvasion = Other.sprTopLeftEvasion;

            ListAnimationLayer = Other.ListAnimationLayer.Copy();
            AnimationPath      = Other.AnimationPath;
            ScreenWidth        = Other.ScreenWidth;
            ScreenHeight       = Other.ScreenHeight;
            LoopStart          = Other.LoopStart;
            LoopEnd            = Other.LoopEnd;
            PolygonEffect      = Other.PolygonEffect;
        }
コード例 #3
0
            public AnimationLayerHolder Copy()
            {
                AnimationLayerHolder NewAnimationLayerHolder = new AnimationLayerHolder();

                NewAnimationLayerHolder.ListAnimationLayer = new List <AnimationLayer>(ListAnimationLayer.Count);

                foreach (AnimationLayer ActiveLayer in ListAnimationLayer)
                {
                    NewAnimationLayerHolder.ListAnimationLayer.Add(ActiveLayer.Copy());
                }

                NewAnimationLayerHolder.GameEngineLayer = (GameEngineLayer)GameEngineLayer.Copy();

                return(NewAnimationLayerHolder);
            }
コード例 #4
0
 public SceneAnimation()
     : base(string.Empty)
 {
     ListAnimationLayer             = new AnimationLayerHolder();
     ListAnimationLayer.EngineLayer = GameEngineLayer.EmptyGameEngineLayer(this);
 }