MyClass.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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}", MySprite2DValue.Texture.Name);
  18. }
  19. [Inspector]
  20. public bool MyBoolValue = true;
  21. [Inspector]
  22. public int MyIntValue = 5;
  23. [Inspector]
  24. public int MyOtherIntValue = 101;
  25. [Inspector]
  26. public Vector3 MyVector3Value = new Vector3(1, 1, 1);
  27. [Inspector]
  28. public Quaternion MyQuaternionValue = new Quaternion(1, 0, 0, 0);
  29. [Inspector()]
  30. public float MyFloatValue = 42.0f;
  31. [Inspector]
  32. public string MyStringValue = "Hey!";
  33. [Inspector]
  34. public BehaviorState State = BehaviorState.Neutral;
  35. [Inspector("Sprites/star.png")]
  36. public Sprite2D MySprite2DValue;
  37. }
  38. }