GameObject.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System;
  4. using System.Runtime.CompilerServices;
  5. namespace BansheeEngine
  6. {
  7. /** @addtogroup Scene
  8. * @{
  9. */
  10. /// <summary>
  11. /// A base class for objects that can be part of the scene and referenced by other game objects.
  12. /// </summary>
  13. public class GameObject : ScriptObject
  14. {
  15. /// <summary>
  16. /// Returns a unique ID for the game object.
  17. /// </summary>
  18. public UInt64 InstanceId
  19. {
  20. get { return Internal_GetInstanceId(mCachedPtr); }
  21. }
  22. [MethodImpl(MethodImplOptions.InternalCall)]
  23. private static extern UInt64 Internal_GetInstanceId(IntPtr thisPtr);
  24. }
  25. /// <summary>
  26. /// Flags used for notifying child scene object and components when a transform has been changed.
  27. /// </summary>
  28. [Flags]
  29. public enum TransformChangedFlags // Note: Must match C++ enum TransformChangedFlags
  30. {
  31. /// <summary>
  32. /// Component will not be notified about any events relating to the transform.
  33. /// </summary>
  34. None = 0x00,
  35. /// <summary>
  36. /// Component will be notified when the its position, rotation or scale has changed.
  37. /// </summary>
  38. Transform = 0x01,
  39. /// <summary>
  40. /// Component will be notified when its parent changes.
  41. /// </summary>
  42. Parent = 0x02,
  43. /// <summary>
  44. /// Component will be notified when its scene object's mobility state changes.
  45. /// </summary>
  46. Mobility = 0x04
  47. }
  48. /** @} */
  49. }