/*
* AQP Project
* http://http://code.google.com/p/aqp-project/
* Alexandre Gomez - Clément Troesch - Fabrice Latterner
*/
package com.aqpproject.worldmodel.game.entity;
import com.aqpproject.game.Singleton;
import com.aqpproject.tools.Vector2D;
/**
*
* @author Clément
*/
public class WEWrongDirection extends WorldEntity {
public WEWrongDirection(String name, String spriteName, Vector2D pos, float rotation, int frame) {
super(name, spriteName, pos, rotation, frame, true, true);
Vector2D size = Singleton.getVisualisation().getSpriteSize(m_spriteName);
Vector2D screen = Singleton.getVisualisation().getResolution();
m_position.x = (screen.x - size.x) / 2;
m_position.y = screen.y - size.y;
Singleton.getVisualisation().setActorAlpha(m_name, 1.f);
Singleton.getVisualisation().updateActorFrame(m_name, 2);
}
public void setWrongDirection(boolean value) {
if (value) {
Singleton.getVisualisation().updateActorFrame(m_name, 1);
} else {
Singleton.getVisualisation().updateActorFrame(m_name, 2);
}
}
}