| 12345678910111213141516171819202122232425262728293031323334 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- using System;
- using System.Runtime.CompilerServices;
- namespace BansheeEngine
- {
- /// <summary>
- /// Wrapper around the native SphereCollider class.
- /// <see cref="SphereCollider"/>
- /// </summary>
- internal class NativeSphereCollider : NativeCollider
- {
- public NativeSphereCollider()
- {
- Internal_CreateInstance(this);
- }
- public float Radius
- {
- get { return Internal_GetRadius(mCachedPtr); }
- set { Internal_SetRadius(mCachedPtr, value); }
- }
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_CreateInstance(NativeSphereCollider instance);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern float Internal_GetRadius(IntPtr thisPtr);
- [MethodImpl(MethodImplOptions.InternalCall)]
- private static extern void Internal_SetRadius(IntPtr thisPtr, float radius);
- }
- }
|