// WARNING - AUTOGENERATED - DO NOT EDIT
//
// Generated using `sharpie urho`
//
// TileMapObject2D.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
{
///
/// Tile map object.
///
public unsafe partial class TileMapObject2D : RefCounted
{
unsafe partial void OnTileMapObject2DCreated ();
[Preserve]
public TileMapObject2D (IntPtr handle) : base (handle)
{
OnTileMapObject2DCreated ();
}
[Preserve]
protected TileMapObject2D (UrhoObjectFlag emptyFlag) : base (emptyFlag)
{
OnTileMapObject2DCreated ();
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr TileMapObject2D_TileMapObject2D ();
[Preserve]
public TileMapObject2D () : base (UrhoObjectFlag.Empty)
{
Runtime.Validate (typeof(TileMapObject2D));
handle = TileMapObject2D_TileMapObject2D ();
Runtime.RegisterObject (this);
OnTileMapObject2DCreated ();
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern TileMapObjectType2D TileMapObject2D_GetObjectType (IntPtr handle);
///
/// Return type.
///
private TileMapObjectType2D GetObjectType ()
{
Runtime.ValidateRefCounted (this);
return TileMapObject2D_GetObjectType (handle);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr TileMapObject2D_GetName (IntPtr handle);
///
/// Return name.
///
private string GetName ()
{
Runtime.ValidateRefCounted (this);
return Marshal.PtrToStringAnsi (TileMapObject2D_GetName (handle));
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr TileMapObject2D_GetType (IntPtr handle);
///
/// Return type.
///
private string UrhoGetType ()
{
Runtime.ValidateRefCounted (this);
return Marshal.PtrToStringAnsi (TileMapObject2D_GetType (handle));
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern Urho.Vector2 TileMapObject2D_GetPosition (IntPtr handle);
///
/// Return position.
///
private Urho.Vector2 GetPosition ()
{
Runtime.ValidateRefCounted (this);
return TileMapObject2D_GetPosition (handle);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern Urho.Vector2 TileMapObject2D_GetSize (IntPtr handle);
///
/// Return size (for rectangle and ellipse).
///
private Urho.Vector2 GetSize ()
{
Runtime.ValidateRefCounted (this);
return TileMapObject2D_GetSize (handle);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern uint TileMapObject2D_GetNumPoints (IntPtr handle);
///
/// Return number of points (use for script).
///
private uint GetNumPoints ()
{
Runtime.ValidateRefCounted (this);
return TileMapObject2D_GetNumPoints (handle);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern Urho.Vector2 TileMapObject2D_GetPoint (IntPtr handle, uint index);
///
/// Return point at index (use for script).
///
public Urho.Vector2 GetPoint (uint index)
{
Runtime.ValidateRefCounted (this);
return TileMapObject2D_GetPoint (handle, index);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern int TileMapObject2D_GetTileGid (IntPtr handle);
///
/// Return tile Gid.
///
private int GetTileGid ()
{
Runtime.ValidateRefCounted (this);
return TileMapObject2D_GetTileGid (handle);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr TileMapObject2D_GetTileSprite (IntPtr handle);
///
/// Return tile sprite.
///
private Sprite2D GetTileSprite ()
{
Runtime.ValidateRefCounted (this);
return Runtime.LookupObject (TileMapObject2D_GetTileSprite (handle));
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern bool TileMapObject2D_HasProperty (IntPtr handle, string name);
///
/// Return has property.
///
public bool HasProperty (string name)
{
Runtime.ValidateRefCounted (this);
return TileMapObject2D_HasProperty (handle, name);
}
[DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
internal static extern IntPtr TileMapObject2D_GetProperty (IntPtr handle, string name);
///
/// Return property value.
///
public string GetProperty (string name)
{
Runtime.ValidateRefCounted (this);
return Marshal.PtrToStringAnsi (TileMapObject2D_GetProperty (handle, name));
}
///
/// Return type.
///
public TileMapObjectType2D ObjectType {
get {
return GetObjectType ();
}
}
///
/// Return name.
///
public string Name {
get {
return GetName ();
}
}
///
/// Return type.
///
public string Type {
get {
return UrhoGetType ();
}
}
///
/// Return position.
///
public Urho.Vector2 Position {
get {
return GetPosition ();
}
}
///
/// Return size (for rectangle and ellipse).
///
public Urho.Vector2 Size {
get {
return GetSize ();
}
}
///
/// Return number of points (use for script).
///
public uint NumPoints {
get {
return GetNumPoints ();
}
}
///
/// Return tile Gid.
///
public int TileGid {
get {
return GetTileGid ();
}
}
///
/// Return tile sprite.
///
public Sprite2D TileSprite {
get {
return GetTileSprite ();
}
}
}
}