protected override async void Init()
{
var cache = Application.ResourceCache;
var node = Node;
var model = node.CreateComponent<StaticModel>();
model.Model = cache.GetModel(Assets.Models.Player);
var material = cache.GetMaterial(Assets.Materials.Player).Clone("");
model.SetMaterial(material);
node.SetScale(0.35f);
node.Position = new Vector3(0f, -6f, 0f);
node.Rotation = new Quaternion(0, 0, 180);
//TODO: rotor should be defined in the model + animation
rotor = node.CreateChild();
var rotorModel = rotor.CreateComponent<Box>();
rotorModel.Color = Color.White;
rotor.Scale = new Vector3(0.1f, 1.5f, 0.1f);
rotor.Position = new Vector3(0, -0.15f, -1.5f);
rotor.RunActions(new RepeatForever(new RotateBy(1f, 0, 0, 360f * 4))); //RPM
// Load weapons
node.AddComponent(new MachineGun());
node.AddComponent(new Missile());
await node.RunActionsAsync(new EaseOut(new MoveBy(0.5f, new Vector3(0, 3, 0)), 2));
MoveRandomly();
// Do an alleron roll each 5 seconds
Node.RunActions(new RepeatForever(new DelayTime(5),
new EaseBackInOut(new RotateBy(1f, 0f, 0f, 360))));
}