Exemplo n.º 1
0
    static int IntToEnum(IntPtr L)
    {
        int arg0            = (int)LuaDLL.lua_tonumber(L, 1);
        SpritePackingMode o = (SpritePackingMode)arg0;

        LuaScriptMgr.PushEnum(L, o);
        return(1);
    }
Exemplo n.º 2
0
        public SpriteSettings(BinaryReader reader)
        {
            settingsRaw = reader.ReadUInt32();

            packed          = settingsRaw & 1;                                   //1
            packingMode     = (SpritePackingMode)((settingsRaw >> 1) & 1);       //1
            packingRotation = (SpritePackingRotation)((settingsRaw >> 2) & 0xf); //4
            meshType        = (SpriteMeshType)((settingsRaw >> 6) & 1);          //1
            //reserved
        }
    private static int get_packingMode(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            Sprite            sprite      = (Sprite)obj;
            SpritePackingMode packingMode = sprite.packingMode;
            ToLua.Push(L, packingMode);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index packingMode on a nil value");
        }
        return(result);
    }
Exemplo n.º 4
0
 public extern void AssignToAtlas(string atlasName, Sprite sprite, SpritePackingMode packingMode, SpritePackingRotation packingRotation);
 public void AssignToAtlas(string atlasName, Sprite sprite, SpritePackingMode packingMode, SpritePackingRotation packingRotation)
 {
     Internal_AssignToAtlas(atlasName, sprite, packingMode, packingRotation);
 }
 private static extern void Internal_AssignToAtlas(string atlasName, Sprite sprite, SpritePackingMode packingMode, SpritePackingRotation packingRotation);
Exemplo n.º 7
0
 public extern void AssignToAtlas(string atlasName, Sprite sprite, SpritePackingMode packingMode, SpritePackingRotation packingRotation);