MyClass.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 Spinner : CSComponent
  13. {
  14. [Inspector]
  15. float speed = 1.0f;
  16. public override void Update(float timeStep)
  17. {
  18. Node.Yaw(timeStep * speed * 75.0f);
  19. //Console.WriteLine("TICK! : {0}", speed);
  20. }
  21. }
  22. public class MyComponent : CSComponent
  23. {
  24. public override void Update(float timeStep)
  25. {
  26. //Node.Yaw(timeStep * 75);
  27. }
  28. [Inspector]
  29. public bool MyBoolValue = true;
  30. [Inspector]
  31. public int MyIntValue = 5;
  32. [Inspector]
  33. public int MyOtherIntValue = 101;
  34. [Inspector]
  35. public Vector3 MyVector3Value = new Vector3(1, 1, 1);
  36. [Inspector]
  37. public Quaternion MyQuaternionValue = new Quaternion(1, 0, 0, 0);
  38. [Inspector()]
  39. public float MyFloatValue = 42.0f;
  40. [Inspector]
  41. public string MyStringValue = "Hey!";
  42. [Inspector]
  43. public BehaviorState State = BehaviorState.Neutral;
  44. [Inspector("Textures/chest.png")]
  45. public Sprite2D MySprite2DValue;
  46. [Inspector(DefaultValue = "Textures/chest.png")]
  47. public Sprite2D MyOtherSprite2DValue;
  48. }
  49. }