File tree Expand file tree Collapse file tree 3 files changed +60
-0
lines changed
Expand file tree Collapse file tree 3 files changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Runtime . CompilerServices ;
3+ using Exeon ;
4+
5+ namespace Exeon
6+ {
7+ public class GameObject
8+ {
9+ [ MethodImpl ( MethodImplOptions . InternalCall ) ]
10+ private static extern UIntPtr GetTransform_Impl ( UIntPtr ptr ) ;
11+
12+ private Transform GetTransform ( ) {
13+ UIntPtr ptr = GetTransform_Impl ( this . nativePtr ) ;
14+ return new Transform ( ptr ) ;
15+ }
16+
17+ private UIntPtr nativePtr ;
18+ public GameObject ( UIntPtr ptr )
19+ {
20+ this . nativePtr = ptr ;
21+ }
22+
23+ public Transform transform {
24+ get => GetTransform ( ) ;
25+ }
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Runtime . CompilerServices ;
3+ using Exeon ;
4+
5+ namespace Exeon
6+ {
7+ public class Transform
8+ {
9+
10+ [ MethodImpl ( MethodImplOptions . InternalCall ) ]
11+ private static extern Vector3 GetLocation_Impl ( UIntPtr ptr ) ;
12+
13+ private UIntPtr nativePtr ;
14+ public Transform ( UIntPtr ptr )
15+ {
16+ this . nativePtr = ptr ;
17+ }
18+
19+ public Vector3 Location
20+ {
21+ get => GetLocation_Impl ( this . nativePtr ) ;
22+ }
23+ }
24+ }
Original file line number Diff line number Diff line change @@ -14,9 +14,18 @@ public Scene(UIntPtr ptr)
1414
1515 [ MethodImpl ( MethodImplOptions . InternalCall ) ]
1616 private static extern bool ObjectExists_Impl ( UIntPtr ptr , string name ) ;
17+ [ MethodImpl ( MethodImplOptions . InternalCall ) ]
18+ private static extern UIntPtr GetObject_Impl ( UIntPtr ptr , string name ) ;
19+
1720 public bool ObjectExists ( string name )
1821 {
1922 return ObjectExists_Impl ( this . nativePtr , name ) ;
2023 }
24+
25+ public GameObject GetObject ( string name )
26+ {
27+ UIntPtr ptr = GetObject_Impl ( this . nativePtr , name ) ;
28+ return new GameObject ( ptr ) ;
29+ }
2130 }
2231}
You can’t perform that action at this time.
0 commit comments