示例#1
0
 public AnimationAtlasPlayer(IAnimationAtlas atlas, IAnimationAtlasAction action)
 {
     _atlas        = atlas;
     this.action   = action;
     _currentFrame = action.StartFrame;
     _frameSpeed   = 0.15f;
     Color         = Color.White;
 }
示例#2
0
        public Sprite(IAnimationAtlas atlas, Dictionary <string, IAnimationAtlasAction> actions)
        {
            Atlas        = atlas;
            AtlasManager = Factory.CreateAnimAtlasManager(this, actions);

            Position = new Vector2(0, 0);
            Speed    = 5f;

            Mover            = Factory.CreateMover(this);
            CollisionHandler = new CollisionHandler(this);
        }
示例#3
0
 public static IAnimationAtlasPlayer CreateAnimAtlasPlayer(IAnimationAtlas atlas, IAnimationAtlasAction action)
 {
     return(new AnimationAtlasPlayer(atlas, action));
 }
示例#4
0
 public static ISprite CreateSprite(IAnimationAtlas atlas, Dictionary <string, IAnimationAtlasAction> actions)
 {
     return(new Sprite(atlas, actions));
 }