Dawn/assets/games/liminal/scenes/SceneStandard.xml

54 lines
1.5 KiB
XML

<scene name="SceneStandard">
<!-- Main Camera, this is put way past where the characters will be -->
<item lookAt="9999, 9999, 9999, 9999, 9999, 0">
<Camera ref="backCamera" />
</item>
<!-- Background -->
<item position="0, 0, -10">
<MeshRenderer />
<QuadMeshHost xy0="-500000, -500000" xy1="500000, 500000" />
<SimpleTexturedMaterial ref="backgroundMaterial" color="COLOR_BLACK" />
</item>
<!-- VN Scene Camera -->
<item lookAt="0, 0.65, 1.8, 0, .65, 0">
<Camera ref="camera" fov="0.610865" />
<CameraTexture ref="camTexture" camera="camera" />
</item>
<!-- UI -->
<item>
<!-- Canvas -->
<UICanvas ref="canvas" camera="backCamera" />
<!-- Textbox -->
<item ref="textbox" prefab="prefabs/VNTextbox" />
<!-- VN Scene Texture -->
<item position="100, 0, 0">
<UIImage
alignment="0, 0, 60, 0"
alignX="UI_COMPONENT_ALIGN_START"
alignUnitRight="UI_COMPONENT_ALIGN_UNIT_PERCENT"
alignY="UI_COMPONENT_ALIGN_STRETCH"
ref="image"
texture="camTexture->renderTarget.getTexture()"
/>
</item>
</item>
<!-- VN Manager -->
<item ref="vnItem">
<VNManager ref="vnManager" />
</item>
<!-- Code to handle scene resizing and auto adjusting the scene camera -->
<code type="init">
useEvent([&amp;]{
assertNotNull(camTexture);
assertNotNull(image);
camTexture->renderTarget.setSize(image->getWidth(), image->getHeight());
}, image->eventAlignmentUpdated);
</code>
</scene>