GameObject.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. /// <summary>
  8. /// A base class for objects that can be part of the scene and referenced by other game objects.
  9. /// </summary>
  10. public class GameObject : ScriptObject
  11. {
  12. /// <summary>
  13. /// Returns a unique ID for the game object.
  14. /// </summary>
  15. public UInt64 InstanceId
  16. {
  17. get { return Internal_GetInstanceId(mCachedPtr); }
  18. }
  19. [MethodImpl(MethodImplOptions.InternalCall)]
  20. private static extern UInt64 Internal_GetInstanceId(IntPtr thisPtr);
  21. }
  22. /// <summary>
  23. /// Flags used for notifying child scene object and components when a transform has been changed.
  24. /// </summary>
  25. [Flags]
  26. public enum TransformChangedFlags // Note: Must match C++ enum TransformChangedFlags
  27. {
  28. /// <summary>
  29. /// Component will not be notified about any events relating to the transform.
  30. /// </summary>
  31. None = 0x00,
  32. /// <summary>
  33. /// Component will be notified when the its position, rotation or scale has changed.
  34. /// </summary>
  35. Transform = 0x01,
  36. /// <summary>
  37. /// Component will be notified when its parent changes.
  38. /// </summary>
  39. Parent = 0x02
  40. }
  41. }