Files
Prism/ExampleApp/Src/Script.cs

45 lines
1.0 KiB
C#

using System;
using Prism;
namespace Example
{
public class Script : Entity
{
public float VerticalSpeed = 5.0f;
public float Speed = 5.0f;
public float Rotation = 0.0f;
public Vec3 Velocity;
public float SinkRate = 1.0f;
public void OnCreate()
{
Console.WriteLine("Script.OnCreate");
Console.WriteLine("this is c# function OnCreate, this will be called by cpp");
}
public void OnUpdate(float ts)
{
/*
Rotation += ts;
Mat4 transform = GetTransform();
Vec3 translation = transform.Translation;
float speed = Speed * ts;
translation.X += Velocity.X * ts;
translation.Y += Velocity.Y * ts;
translation.Z += Velocity.Z * ts;
translation.Y -= SinkRate * ts;
transform.Translation = translation;
SetTransform(transform);
*/
}
}
}