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; }
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]; }
private static void InitializeAnimations() { AnimationGroupManager.LoadAnimationGroups("textures.txt"); AnimationGroupAnimationManager.LoadAnimations("textures.txt"); }
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; }