VNSceneGen is more or less working
This commit is contained in:
@ -1,101 +0,0 @@
|
||||
<vnscene name="ExampleScene">
|
||||
<item ref="eth" prefab="preafbs/charactersEthereality" />
|
||||
<item ref="craig" prefab="preafbs/characters/Craig" />
|
||||
<item ref="bg" prefab="preafbs/backgrounds/School" />
|
||||
<item ref="square" prefab="prefabs/visualnovel/VisualNovelSquare" />
|
||||
<property type="" ref="easeOut" value="easeOutQuad" />
|
||||
|
||||
<events>
|
||||
<!-- Set the default values -->
|
||||
<position item="bg" x="0" y="0" z="0" />
|
||||
<position item="craig" x="0" y="0" z="1" />
|
||||
<position item="eth" x="0" y="0" z="1" />
|
||||
<position item="square" x="0" y="0" z="10" />
|
||||
|
||||
<set property="square->material->color" value="COLOR_BLACK" />
|
||||
<set property="craig->material->color.a" value="0" />
|
||||
|
||||
<!-- Fade out the black overlay -->
|
||||
<set property="square->material->color.a" from="1" to="0" duration="1" curve="easeOut" />
|
||||
|
||||
<!-- Example Text, also showing how in future we can support multiple languages -->
|
||||
<text character="eth">
|
||||
<string lang="en">Hi, I'm Ethereality.</string>
|
||||
</text>
|
||||
|
||||
<!-- Fade in craig -->
|
||||
<set item="craig->material->color.a" from="0" to="1" duration="1" curve="easeOut" />
|
||||
<text character="craig">
|
||||
<string lang="en">Hi, I'm Craig.</string>
|
||||
</text>
|
||||
|
||||
<!--
|
||||
Because each event stops things happening until it's complete, let's
|
||||
assume we want to do two things at once, say move and fade out a character
|
||||
at the same time. This will make craig exit screen left.
|
||||
-->
|
||||
<parallel>
|
||||
<set item="craig->material->color.a" from="1" to="0" duration="1" curve="easeOut" />
|
||||
<position item="craig" x="-2" duration="1" curve="easeOut" />
|
||||
</parallel>
|
||||
|
||||
<!-- Now Craig is gone, so sad, let's now fade the screen out and present some choices -->
|
||||
<set item="square->material->color.a" from="0" to="1" duration="1" curve="easeOut" />
|
||||
|
||||
<!-- Here I am creating a marker -->
|
||||
<marker name="craigCool" />
|
||||
|
||||
<choices character="eth" key="isCraigCool">
|
||||
<title>
|
||||
<string lang="en">Do you think Craig is cool?</string>
|
||||
</title>
|
||||
<choice value="no">
|
||||
<string lang="en">Yes</string>
|
||||
</choice>
|
||||
<choice value="yes">
|
||||
<string lang="en">No</string>
|
||||
</choice>
|
||||
<choice value="maybe">
|
||||
<string lang="en">Maybe</string>
|
||||
</choice>
|
||||
</choices>
|
||||
|
||||
<!--
|
||||
Now we have a choice, we can use the key to get the value of the choice
|
||||
and do something with it. In this case, we'll just show a different
|
||||
message depending on the choice.
|
||||
|
||||
If the user selects "Maybe", we basically just display a message and then
|
||||
go back to the choices indefinitely.
|
||||
-->
|
||||
<if key="isCraigCool" value="maybe">
|
||||
<text character="eth">
|
||||
<string lang="en">Are you unsure?</string>
|
||||
</text>
|
||||
<goto-marker name="craigCool" />
|
||||
</if>
|
||||
|
||||
<if key="isCraigCool" value="yes">
|
||||
<text character="eth">
|
||||
<string lang="en">I agree, Craig is cool.</string>
|
||||
</text>
|
||||
</if>
|
||||
<if key="isCraigCool" value="no">
|
||||
<text character="eth">
|
||||
<string lang="en">I disagree, Craig is cool.</string>
|
||||
</text>
|
||||
</if>
|
||||
|
||||
<!-- We can also modify values/set values too. -->
|
||||
<choice-set key="isCraigCool" value="yes" />
|
||||
|
||||
<!-- We can also wait some time -->
|
||||
<wait duration="1" />
|
||||
|
||||
<!--
|
||||
Now change scenes. Changing scenes is handled in-engine to stop the game
|
||||
crashing from a lack of memory.
|
||||
-->
|
||||
<scene-change name="scenes/ExampleScene2" />
|
||||
</events>
|
||||
</vnscene>
|
@ -1,4 +1,4 @@
|
||||
<vnscene name="ExampleScene" extend="scene/ExtendedScene">
|
||||
<vnscene name="VNSceneTest" extend="scenes/ExtendedScene">
|
||||
<item ref="eth" prefab="prefabs/SimpleSpinningCubePrefab" />
|
||||
<item ref="craig" prefab="prefabs/SimpleSpinningCubePrefab" />
|
||||
<item ref="bg" prefab="prefabs/SimpleSpinningCubePrefab" />
|
||||
|
Reference in New Issue
Block a user