Commit 6622edef authored by Colin Thomas's avatar Colin Thomas

Adding of comments and of animations management in game panel

parent 66204c4f
......@@ -17,6 +17,7 @@ import graphics.graphical_utility.coreProcesses.GameContentMapChangeListener;
import graphics.guiSkeleton.*;
import graphics.guiSkeleton.entityDisplayer.HealthBarDisplayer;
import graphics.guiSkeleton.mapManagement.*;
import graphics.guiSkeleton.sprites.Animation;
import graphics.ingame_input_listener.Input;
import javax.swing.*;
......@@ -193,6 +194,9 @@ public class GamePanel extends GUIPanel implements GameContentMapChangeListener,
System.out.println("gamePanel repaint, width=" + getSize().width + ", height=" + getSize().height);
}
/** Update the Animations **/
Animation.updateAnimation();
/** Get the GraphicsMapPoint of the position of the entity followed by the gamePanel **/
GraphicsMapPoint followedEntityPositionGraphicsMapPoint = GraphicalBridgeConfiguration.makeMapPointFromCoreCoordinates(followedRelayer.getCharacter().getX(), followedRelayer.getCharacter().getY());
if (debugMapPoint) {
......
......@@ -7,6 +7,8 @@ import java.util.List;
/**
* Created by Colin on 30/12/15.
* Instances of this class are looping animation (looping on the frame list).
* They can be constructed via spritesheet (where sprites appear horizontally, left to right), or via sprite list.
*/
public class Animation implements Serializable, Displayable
{
......
......@@ -4,6 +4,8 @@ import java.awt.image.BufferedImage;
/**
* Created by Colin on 30/12/15.
* Interface for displayable object (for now Sprite and Animation)
* Can be used to represent an object that is one of those.
*/
public interface Displayable
{
......
......@@ -5,6 +5,7 @@ import java.io.Serializable;
/**
* Created by Colin on 30/12/15.
* Only used in Animation class, represents a Frame of an animation (a sprite + a duration)
*/
public class Frame implements Serializable
{
......
......@@ -6,6 +6,7 @@ import java.io.Serializable;
/**
* Created by dupriez on 03/11/15.
* Represents a basic sprite with no animation.
*/
public class Sprite implements Serializable, Displayable{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment