@Override public void resume() { World w = World.getInstance(); BaseActor actor = w.getCurrentScene().getActor(characterName, false); if (characterTurn) { characterTurn = false; if (previousAnim != null) { SpriteActor player = World.getInstance().getCurrentScene().getPlayer(); player.startAnimation(previousAnim, null); } if (responseText != null) { // WorldCamera c = World.getInstance().getCamera(); // Vector3 p = c.scene2screen(pos.x, pos.y + actor.getHeight()); World.getInstance() .getTextManager() .addSubtitle( responseText, actor.getX(), actor.getY() + actor.getBBox().getBoundingRectangle().getHeight(), false, Text.Type.TALK, Color.BLACK, this); if (actor instanceof CharacterActor) { startTalkAnim((CharacterActor) actor); } } else { super.resume(); } } else { if (actor instanceof SpriteActor) { ((SpriteActor) actor).startAnimation(previousAnim, null); } super.resume(); } }
private Verb getVerb(String verb, String target, String state) { Verb v = null; if (actorId != null) { BaseActor a = World.getInstance().getCurrentScene().getActor(actorId, true); v = a.getVerbManager().getVerb(verb, state, target); } if (v == null) { v = World.getInstance().getCurrentScene().getVerb(verb); } if (v == null) { v = VerbManager.getWorldVerbs().get(verb); } if (v == null) EngineLogger.error("Cannot find VERB: " + verb + " for ACTOR: " + actorId); return v; }
@Override public void undo() { a.setPosition(pos.x, pos.y); Ctx.project.setModified(this, Project.POSITION_PROPERTY, null, a); }