Spawner, SpawnPoint and PlayerSpawn components, and base work on their systems
This commit is contained in:
@@ -12,4 +12,7 @@
|
||||
<xs:include schemaLocation="Components/Trigger.xsd"/>
|
||||
<xs:include schemaLocation="Components/Health.xsd"/>
|
||||
<xs:include schemaLocation="Components/Collidable.xsd"/>
|
||||
<xs:include schemaLocation="Components/Spawner.xsd"/>
|
||||
<xs:include schemaLocation="Components/SpawnPoint.xsd"/>
|
||||
<xs:include schemaLocation="Components/PlayerSpawn.xsd"/>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,3 @@
|
||||
<c:Spawner>
|
||||
<TeamID>1</EntityFile>
|
||||
</c:Spawner>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||
|
||||
<xs:element name="PlayerSpawn">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Combined with a Spawner, defines a spawn point for a player team.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="TeamID" type="t:int" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>1 = Spectator, 2 = Red, 3 = Blue</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1 @@
|
||||
<c:SpawnPoint/>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||
|
||||
<xs:element name="SpawnPoint">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Defines this entity as a spawn point for a parent Spawner</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -0,0 +1,3 @@
|
||||
<c:Spawner>
|
||||
<EntityFile></EntityFile>
|
||||
</c:Spawner>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
|
||||
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
|
||||
|
||||
<xs:element name="Spawner">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Randomly selects a child SpawnPoint component and spawns a copy of an entity template when receiving a SpawnerSpawn event. If no SpawnPoint is found it spawns from its own position.</xs:documentation>
|
||||
</xs:annotation>
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="EntityFile" type="t:string" minOccurs="0">
|
||||
<xs:annotation><xs:documentation>The entity template to spawn</xs:documentation></xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
<Components>
|
||||
<c:AABB/>
|
||||
<c:Physics/>
|
||||
<c:Collidable/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitSphere.obj</Resource>
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Entity xmlns:c="components" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../Types/Entity.xsd">
|
||||
|
||||
<Components>
|
||||
<c:Transform/>
|
||||
</Components>
|
||||
|
||||
<Children>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:Spawner>
|
||||
<EntityFile>Schema/Entities/Player.xml</EntityFile>
|
||||
</c:Spawner>
|
||||
<c:Transform>
|
||||
<Position X="11.2723322" Y="1.28011799" Z="3.66820574"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:SpawnPoint/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitSphere.obj</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="1.26689196"/>
|
||||
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:SpawnPoint/>
|
||||
<c:Model>
|
||||
<Resource>Models/Core/UnitSphere.obj</Resource>
|
||||
</c:Model>
|
||||
<c:Transform>
|
||||
<Position X="0" Y="0" Z="-1.14786315"/>
|
||||
<Scale X="0.300000012" Y="0.300000012" Z="0.300000012"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
</Entity>
|
||||
<Entity>
|
||||
<Components>
|
||||
<c:Camera/>
|
||||
<c:Transform>
|
||||
<Position X="-9.75645447" Y="12.7158976" Z="7.92630243"/>
|
||||
<Orientation X="-0.757485211" Y="-1.44177103" Z="7.17310422e-06"/>
|
||||
</c:Transform>
|
||||
</Components>
|
||||
<Children/>
|
||||
</Entity>
|
||||
</Children>
|
||||
|
||||
</Entity>
|
||||
@@ -20,6 +20,9 @@
|
||||
<xs:element ref="c:Trigger" minOccurs="0"/>
|
||||
<xs:element ref="c:Health" minOccurs="0"/>
|
||||
<xs:element ref="c:Collidable" minOccurs="0"/>
|
||||
<xs:element ref="c:Spawner" minOccurs="0"/>
|
||||
<xs:element ref="c:SpawnPoint" minOccurs="0"/>
|
||||
<xs:element ref="c:PlayerSpawn" minOccurs="0"/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
Reference in New Issue
Block a user