MyClass.cs 973 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. 
  2. using AtomicEngine;
  3. using System;
  4. namespace AtomicNETTest
  5. {
  6. public enum BehaviorState
  7. {
  8. Friendly,
  9. Aggressive,
  10. Neutral
  11. }
  12. public class MyComponent : CSComponent
  13. {
  14. public override void Update(float timeStep)
  15. {
  16. Node.Yaw(timeStep * 75);
  17. //Console.WriteLine("TICK! : {0}", nativeInstance);
  18. }
  19. [Inspector]
  20. public bool MyBoolValue = true;
  21. [Inspector]
  22. public int MyIntValue = 5;
  23. [Inspector]
  24. public Vector3 MyVector3Value = new Vector3(1, 1, 1);
  25. [Inspector]
  26. public Quaternion MyQuaternionValue = new Quaternion(1, 0, 0, 0);
  27. [Inspector()]
  28. public float MyFloatValue = 42.0f;
  29. [Inspector]
  30. public string MyStringValue = "Hey!";
  31. [Inspector]
  32. public BehaviorState State = BehaviorState.Neutral;
  33. [Inspector("Sprites/star.png")]
  34. public Sprite2D sprite2D;
  35. }
  36. }