1package com.osroyale.content.activity.impl.cutscene;
3import com.osroyale.content.activity.ActivityType;
4import com.osroyale.game.world.World;
5import com.osroyale.game.world.entity.mob.player.Player;
6import com.osroyale.game.world.position.Position;
10 private static final Position CUTSCENE_POSITION =
new Position(3222, 3222, 0);
12 private TestCutscene(Player player) {
13 super(player, 1,
true);
16 public static TestCutscene create(Player player) {
17 TestCutscene cutscene =
new TestCutscene(player);
19 cutscene.resetCooldown();
24 protected void onFadeIn() {
25 spawnNpc(1, CUTSCENE_POSITION.transform(2, 0, 0));
30 private void runStages() {
34 private void runStage(
int stage) {
37 dialogue(
"Welcome to the test cutscene!");
38 World.schedule(3, () -> runStage(1));
41 npcDialogue(1,
"Hello there!",
"This is a test of the cutscene system.");
42 World.schedule(4, () -> runStage(2));
45 playerDialogue(
"Wow, this is amazing!");
46 World.schedule(4, () -> runStage(3));
49 moveCamera(player.getPosition().transform(5, 5, 0), 100, 0);
50 World.schedule(3, () -> runStage(4));
53 dialogue(
"The camera has moved!",
"Let's shake it a bit...");
54 World.schedule(4, () -> runStage(5));
58 World.schedule(3, () -> runStage(6));
62 dialogue(
"And that's the end of our test cutscene!");
63 World.schedule(4, () ->
finish());
69 protected Position getStartPosition() {
70 return CUTSCENE_POSITION;
74 protected void start() {
84 public ActivityType getType() {
85 return ActivityType.CUTSCENE;