TestComponent.cs 978 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using AtomicEngine;
  3. namespace ComponentTest
  4. {
  5. public enum BehaviorState
  6. {
  7. Friendly,
  8. Aggressive,
  9. Neutral
  10. }
  11. public class TestComponent : CSComponent
  12. {
  13. [Inspector]
  14. public bool MyBoolValue = true;
  15. [Inspector]
  16. public int MyIntValue = 5;
  17. [Inspector]
  18. public int MyOtherIntValue = 101;
  19. [Inspector]
  20. public Vector3 MyVector3Value = new Vector3(1, 1, 1);
  21. [Inspector]
  22. public Quaternion MyQuaternionValue = new Quaternion(1, 0, 0, 0);
  23. [Inspector()]
  24. public float MyFloatValue = 42.0f;
  25. [Inspector]
  26. public string MyStringValue = "Hey!";
  27. [Inspector]
  28. public BehaviorState State = BehaviorState.Neutral;
  29. [Inspector("Textures/chest.png")]
  30. public Sprite2D MySprite2DValue;
  31. [Inspector(DefaultValue : "Textures/chest.png")]
  32. public Sprite2D MyOtherSprite2DValue;
  33. }
  34. }