Class StatefulSpritesheetAnimation<State>
java.lang.Object
de.pirckheimer_gymnasium.engine_pi.actor.Actor
de.pirckheimer_gymnasium.engine_pi.actor.StatefulAnimation<State>
de.pirckheimer_gymnasium.engine_pi.actor.StatefulSpritesheetAnimation<State>
- Type Parameters:
State- Typ der Zustände, zwischen denen in der Animation gewechselt werden soll.
- All Implemented Interfaces:
FrameUpdateListenerRegistration,KeyStrokeListenerRegistration,MouseClickListenerRegistration,MouseScrollListenerRegistration
- Since:
- 0.27.0
- Author:
- Josef Friedrich
-
Field Summary
Fields inherited from class de.pirckheimer_gymnasium.engine_pi.actor.StatefulAnimation
frameDuration, height, width -
Constructor Summary
ConstructorsConstructorDescriptionStatefulSpritesheetAnimation(double width, double height, double frameDuration) -
Method Summary
Methods inherited from class de.pirckheimer_gymnasium.engine_pi.actor.StatefulAnimation
addState, changeState, getHeight, getState, getWidth, hasState, isAnimationPaused, isFlipHorizontal, isFlipVertical, render, setAnimationPaused, setFlipHorizontal, setFlipVertical, setFrameDuration, setSize, setState, setStateTransitionMethods inherited from class de.pirckheimer_gymnasium.engine_pi.actor.Actor
addCollisionListener, addCollisionListener, addCollisionListener, addMountListener, addUnmountListener, animateOpacity, animateParticle, applyForce, applyForce, applyForce, applyImpulse, applyImpulse, applyImpulse, applyRotationImpulse, applyTorque, awake, contains, createDistanceJoint, createPrismaticJoint, createRevoluteJoint, createRopeJoint, createWeldJoint, getAngularDamping, getAngularVelocity, getBodyType, getCenter, getCenterRelative, getCollisions, getColor, getComplementaryColor, getDensity, getElasticity, getFrameUpdateListeners, getFriction, getGravityScale, getKeyStrokeListeners, getLayer, getLayerPosition, getLinearDamping, getListenerBundle, getMass, getMouseClickListeners, getMouseScrollListeners, getOpacity, getPhysicsHandler, getPosition, getPositionformatted, getRotation, getVelocity, getX, getY, isGrounded, isMounted, isRotationLocked, isVisible, lockRotation, makeDynamic, makeKinematic, makeParticle, makeSensor, makeStatic, moveBy, moveBy, overlaps, remove, removeMountListener, removeUnmountListener, renderBasic, resetMovement, rotateBy, setAngularDamping, setAngularVelocity, setBodyType, setCenter, setCenter, setColor, setColor, setDensity, setElasticity, setFixture, setFixtures, setFixtures, setFriction, setGravityScale, setLayerPosition, setLinearDamping, setOpacity, setPhysicsHandler, setPosition, setPosition, setRotation, setRotationLocked, setVelocity, setVisible, setX, setY, sleep, toggleVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.pirckheimer_gymnasium.engine_pi.event.FrameUpdateListenerRegistration
addFrameUpdateListener, defer, delay, removeFrameUpdateListener, repeat, repeat, repeat, repeat, repeatMethods inherited from interface de.pirckheimer_gymnasium.engine_pi.event.KeyStrokeListenerRegistration
addKeyStrokeListener, removeKeyStrokeListenerMethods inherited from interface de.pirckheimer_gymnasium.engine_pi.event.MouseClickListenerRegistration
addMouseClickListener, removeMouseClickListenerMethods inherited from interface de.pirckheimer_gymnasium.engine_pi.event.MouseScrollListenerRegistration
addMouseScrollListener, removeMouseScrollListener
-
Constructor Details
-
StatefulSpritesheetAnimation
public StatefulSpritesheetAnimation(double width, double height, double frameDuration) - Parameters:
width- Die Breite in Meter der animierten Figur.height- Die Höhe in Meter der animierten Figur.frameDuration- Die Dauer in Sekunden, die die Einzelbilder aktiv bleiben.
-
-
Method Details
-
addState
- Parameters:
state- Der Zustand, unter dem die Animation gespeichert wird.x- Die Anzahl an Sprites in x-Richtung.y- Die Anzahl an Sprites in y-Richtung.
-
addState
- Parameters:
state- Der Zustand, unter dem die Animation gespeichert wird.filePath- Der Dateipfad des Spritesheets.spriteWidth- Die Breite des Sprites in Pixel.spriteHeight- Die Höhe des Sprites in Pixel.
-