Exemplo n.º 1
0
        public Player()
        {
            this.speed    = new Vector2D(3, 3);
            this.position = new Vector2D(10, 10);

            animation = AnimationGroupManager.GetAnimationGroup("player_animation");
            animation.SetCurrentAnimation("player_up");

            Program.RenderWindow.KeyPressed  += RenderWindow_KeyPressed;
            Program.RenderWindow.KeyReleased += RenderWindow_KeyReleased;
        }
Exemplo n.º 2
0
        public Character(Vector2D position, Vector2D speed, DirectionAnimationCouple animationCouples,
                         World world, string animation, int collisionLayer)
            : base(position)
        {
            this.collisionLayer = collisionLayer;
            this.world          = world is LayeredWorld ? (LayeredWorld)world : world;

            this.speed            = speed;
            this.position         = position;
            this.animationCouples = animationCouples;
            this.animation        = AnimationGroupManager.GetAnimationGroup(animation);

            this.animation.CurrentAnimation = animationCouples[Direction.Down];
        }
Exemplo n.º 3
0
 private static void InitializeAnimations()
 {
     AnimationGroupManager.LoadAnimationGroups("textures.txt");
     AnimationGroupAnimationManager.LoadAnimations("textures.txt");
 }
Exemplo n.º 4
0
 public AnimatedTile(bool isHollow, string animation, Vector2D position)
     : base(isHollow, "cmd:none", position)
 {
     this.animation          = AnimationGroupManager.GetAnimationGroup(animation);
     this.animation.Position = CoordinateSystemConverter.WorldToPixels(position).InternalVector;
 }