Skip to content
Snippets Groups Projects
Commit 7abf0b9c authored by fernaldyl's avatar fernaldyl
Browse files

feat: victory and ending script

parent e29fa9d7
No related merge requests found
......@@ -31,7 +31,7 @@ public class ScriptPlayer : MonoBehaviour
private enum SceneType
{
OPENING, ENDING
OPENING, VICTORY, ENDING
}
void Start()
......@@ -39,6 +39,9 @@ public class ScriptPlayer : MonoBehaviour
if (sceneType == SceneType.OPENING)
{
insertOpeningScripts();
} else if (sceneType == SceneType.VICTORY)
{
insertVictoryScript();
} else if (sceneType == SceneType.ENDING)
{
insertEndingScripts();
......@@ -63,7 +66,10 @@ public class ScriptPlayer : MonoBehaviour
{
if (sceneType == SceneType.OPENING)
{
SceneManager.LoadScene("Level_01", LoadSceneMode.Single);
SceneManager.LoadScene("Level_01");
} else if (sceneType == SceneType.VICTORY)
{
SceneManager.LoadScene("Level_01");
}
}
}
......@@ -116,7 +122,19 @@ public class ScriptPlayer : MonoBehaviour
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "Our protagonist, a boy named Ash, finds himself trapped in the midst of a horde of zombies."
text = "It was supposed to be a fun night of hunting and camping."
});
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "Suddenly, a group of zombies descended upon them, catching Ash and his friends off guard."
});
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "Ash now finds himself trapped in the midst of a horde of zombies."
});
scripts.Add(new Script
......@@ -156,36 +174,57 @@ public class ScriptPlayer : MonoBehaviour
});
}
private void insertEndingScripts()
private void insertVictoryScript()
{
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "The boss zombie falls to the ground with a thunderous crash."
text = "Ash stands over the remains of the zombie boss, panting heavily from the intense fight."
});
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "Ash breathes a sigh of relief, knowing he's finally made it out alive."
text = "All around him, the bodies of the undead lie motionless on the ground, their threat neutralized."
});
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "Ash surveys the area, making sure there are no more threats lurking in the shadows."
});
scripts.Add(new Script
{
characterName = "Ash",
text = "I need to find my way out of this area back to the city center."
});
}
private void insertEndingScripts()
{
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "Ash finally sees a glimmer of hope as he stumbles upon a path leading out of the dense forest."
});
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "As he looks around at the carnage and destruction, he realizes that he'll never be the same again."
text = "With a renewed sense of energy, he pushes through the last of the foliage and emerges into a clearing."
});
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "But for now, he's just grateful to be alive."
text = "As he steps into the open, the first rays of sunlight break through the trees, bathing the world in a warm glow."
});
scripts.Add(new Script
{
characterName = "[Narrator]",
text = "Ash begins to make his way towards the distant glow of a safe haven in the distance."
text = "Ash breathes in the fresh air and basks in the newfound warmth, grateful to be alive and free from the nightmare of the zombie horde."
});
}
......
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