| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // TileMap2D.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho.Urho2D
- {
- /// <summary>
- /// Tile map component.
- /// </summary>
- public unsafe partial class TileMap2D : Component
- {
- unsafe partial void OnTileMap2DCreated ();
- [Preserve]
- public TileMap2D (IntPtr handle) : base (handle)
- {
- OnTileMap2DCreated ();
- }
- [Preserve]
- protected TileMap2D (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnTileMap2DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TileMap2D_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (TileMap2D_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMap2D_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (TileMap2D_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TileMap2D_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(TileMap2D));
- return new StringHash (TileMap2D_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMap2D_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(TileMap2D));
- return Marshal.PtrToStringAnsi (TileMap2D_GetTypeNameStatic ());
- }
- [Preserve]
- public TileMap2D () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMap2D_TileMap2D (IntPtr context);
- [Preserve]
- public TileMap2D (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(TileMap2D));
- handle = TileMap2D_TileMap2D ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnTileMap2DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMap2D_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(TileMap2D));
- TileMap2D_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMap2D_DrawDebugGeometry (IntPtr handle, IntPtr debug, bool depthTest);
- /// <summary>
- /// Visualize the component as debug geometry.
- /// </summary>
- public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
- {
- Runtime.ValidateRefCounted (this);
- TileMap2D_DrawDebugGeometry (handle, (object)debug == null ? IntPtr.Zero : debug.Handle, depthTest);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMap2D_SetTmxFile (IntPtr handle, IntPtr tmxFile);
- /// <summary>
- /// Set tmx file.
- /// </summary>
- private void SetTmxFile (TmxFile2D tmxFile)
- {
- Runtime.ValidateRefCounted (this);
- TileMap2D_SetTmxFile (handle, (object)tmxFile == null ? IntPtr.Zero : tmxFile.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMap2D_DrawDebugGeometry0 (IntPtr handle);
- /// <summary>
- /// Add debug geometry to the debug renderer.
- /// </summary>
- public void DrawDebugGeometry ()
- {
- Runtime.ValidateRefCounted (this);
- TileMap2D_DrawDebugGeometry0 (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMap2D_GetTmxFile (IntPtr handle);
- /// <summary>
- /// Return tmx file.
- /// </summary>
- private TmxFile2D GetTmxFile ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<TmxFile2D> (TileMap2D_GetTmxFile (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.Urho2D.TileMapInfo2D TileMap2D_GetInfo (IntPtr handle);
- /// <summary>
- /// Return information.
- /// </summary>
- private Urho.Urho2D.TileMapInfo2D GetInfo ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMap2D_GetInfo (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint TileMap2D_GetNumLayers (IntPtr handle);
- /// <summary>
- /// Return number of layers.
- /// </summary>
- private uint GetNumLayers ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMap2D_GetNumLayers (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMap2D_GetLayer (IntPtr handle, uint index);
- /// <summary>
- /// Return tile map layer at index.
- /// </summary>
- public TileMapLayer2D GetLayer (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<TileMapLayer2D> (TileMap2D_GetLayer (handle, index));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Vector2 TileMap2D_TileIndexToPosition (IntPtr handle, int x, int y);
- /// <summary>
- /// Convert tile index to position.
- /// </summary>
- public Vector2 TileIndexToPosition (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- return TileMap2D_TileIndexToPosition (handle, x, y);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TileMap2D_PositionToTileIndex (IntPtr handle, ref int x, ref int y, ref Urho.Vector2 position);
- /// <summary>
- /// Convert position to tile index, if out of map return false.
- /// </summary>
- public bool PositionToTileIndex (ref int x, ref int y, Urho.Vector2 position)
- {
- Runtime.ValidateRefCounted (this);
- return TileMap2D_PositionToTileIndex (handle, ref x, ref y, ref position);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern ResourceRef TileMap2D_GetTmxFileAttr (IntPtr handle);
- /// <summary>
- /// Return tile map file attribute.
- /// </summary>
- private ResourceRef GetTmxFileAttr ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMap2D_GetTmxFileAttr (handle);
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return tmx file.
- /// Or
- /// Set tmx file.
- /// </summary>
- public TmxFile2D TmxFile {
- get {
- return GetTmxFile ();
- }
- set {
- SetTmxFile (value);
- }
- }
- /// <summary>
- /// Return information.
- /// </summary>
- public Urho.Urho2D.TileMapInfo2D Info {
- get {
- return GetInfo ();
- }
- }
- /// <summary>
- /// Return number of layers.
- /// </summary>
- public uint NumLayers {
- get {
- return GetNumLayers ();
- }
- }
- /// <summary>
- /// Return tile map file attribute.
- /// </summary>
- public ResourceRef TmxFileAttr {
- get {
- return GetTmxFileAttr ();
- }
- }
- }
- }
|