Now that we have the basic knowledge required to create a mini-game, why not do so? To start off, we'll aim towards creating a very basic system for spawning actors and entities.
To start, let's clarify exactly what we want to do:
Spawn our actor.
Assign our actor to one of the two possible teams.
Check when an actor enters the opposite team's
Headquarters
entity, and end it.
The first thing we need to do is spawn our actor, which can't be done before we have one. To do this, we'll need to create a MyActor.cs
file somewhere in the Game/Scripts
directory and then add the following code:
public class MyActor : Actor { }
This code snippet is the bare minimum required for an actor to be registered.
We should also update our actor's view, to make sure the player sees something when entering the game.
protected override void UpdateView(ref ViewParams viewParams) { var fov = MathHelpers.DegreesToRadians(60); viewParams...