Skip to content

Commit 33bda90

Browse files
committed
Support full tilemap export and import in SPX v2.
1 parent c65c967 commit 33bda90

File tree

21 files changed

+2598
-2195
lines changed

21 files changed

+2598
-2195
lines changed

cmd/gox/pkg/gengo/pkg/github.com/goplus/spx/v2/export.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func init() {
7070
NamedTypes: map[string]reflect.Type{
7171
"Color": reflect.TypeOf((*q.Color)(nil)).Elem(),
7272
"Config": reflect.TypeOf((*q.Config)(nil)).Elem(),
73+
"DecoratorJSON": reflect.TypeOf((*q.DecoratorJSON)(nil)).Elem(),
7374
"EffectKind": reflect.TypeOf((*q.EffectKind)(nil)).Elem(),
7475
"Game": reflect.TypeOf((*q.Game)(nil)).Elem(),
7576
"List": reflect.TypeOf((*q.List)(nil)).Elem(),

cmd/gox/pkg/gengo/pkg/github.com/goplus/spx/v2/pkg/gdspx/pkg/engine/export.go

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,25 @@ func init() {
2525
"sync": "sync",
2626
},
2727
Interfaces: map[string]reflect.Type{
28-
"IAudioMgr": reflect.TypeOf((*q.IAudioMgr)(nil)).Elem(),
29-
"ICameraMgr": reflect.TypeOf((*q.ICameraMgr)(nil)).Elem(),
30-
"IDebugMgr": reflect.TypeOf((*q.IDebugMgr)(nil)).Elem(),
31-
"IExtMgr": reflect.TypeOf((*q.IExtMgr)(nil)).Elem(),
32-
"IInputMgr": reflect.TypeOf((*q.IInputMgr)(nil)).Elem(),
33-
"ILifeCycle": reflect.TypeOf((*q.ILifeCycle)(nil)).Elem(),
34-
"IManager": reflect.TypeOf((*q.IManager)(nil)).Elem(),
35-
"INavigationMgr": reflect.TypeOf((*q.INavigationMgr)(nil)).Elem(),
36-
"IPenMgr": reflect.TypeOf((*q.IPenMgr)(nil)).Elem(),
37-
"IPhysicMgr": reflect.TypeOf((*q.IPhysicMgr)(nil)).Elem(),
38-
"IPlatformMgr": reflect.TypeOf((*q.IPlatformMgr)(nil)).Elem(),
39-
"IResMgr": reflect.TypeOf((*q.IResMgr)(nil)).Elem(),
40-
"ISceneMgr": reflect.TypeOf((*q.ISceneMgr)(nil)).Elem(),
41-
"ISpriteMgr": reflect.TypeOf((*q.ISpriteMgr)(nil)).Elem(),
42-
"ISpriter": reflect.TypeOf((*q.ISpriter)(nil)).Elem(),
43-
"ITilemapMgr": reflect.TypeOf((*q.ITilemapMgr)(nil)).Elem(),
44-
"IUiMgr": reflect.TypeOf((*q.IUiMgr)(nil)).Elem(),
45-
"IUiNode": reflect.TypeOf((*q.IUiNode)(nil)).Elem(),
28+
"IAudioMgr": reflect.TypeOf((*q.IAudioMgr)(nil)).Elem(),
29+
"ICameraMgr": reflect.TypeOf((*q.ICameraMgr)(nil)).Elem(),
30+
"IDebugMgr": reflect.TypeOf((*q.IDebugMgr)(nil)).Elem(),
31+
"IExtMgr": reflect.TypeOf((*q.IExtMgr)(nil)).Elem(),
32+
"IInputMgr": reflect.TypeOf((*q.IInputMgr)(nil)).Elem(),
33+
"ILifeCycle": reflect.TypeOf((*q.ILifeCycle)(nil)).Elem(),
34+
"IManager": reflect.TypeOf((*q.IManager)(nil)).Elem(),
35+
"INavigationMgr": reflect.TypeOf((*q.INavigationMgr)(nil)).Elem(),
36+
"IPenMgr": reflect.TypeOf((*q.IPenMgr)(nil)).Elem(),
37+
"IPhysicMgr": reflect.TypeOf((*q.IPhysicMgr)(nil)).Elem(),
38+
"IPlatformMgr": reflect.TypeOf((*q.IPlatformMgr)(nil)).Elem(),
39+
"IResMgr": reflect.TypeOf((*q.IResMgr)(nil)).Elem(),
40+
"ISceneMgr": reflect.TypeOf((*q.ISceneMgr)(nil)).Elem(),
41+
"ISpriteMgr": reflect.TypeOf((*q.ISpriteMgr)(nil)).Elem(),
42+
"ISpriter": reflect.TypeOf((*q.ISpriter)(nil)).Elem(),
43+
"ITilemapMgr": reflect.TypeOf((*q.ITilemapMgr)(nil)).Elem(),
44+
"ITilemapparserMgr": reflect.TypeOf((*q.ITilemapparserMgr)(nil)).Elem(),
45+
"IUiMgr": reflect.TypeOf((*q.IUiMgr)(nil)).Elem(),
46+
"IUiNode": reflect.TypeOf((*q.IUiNode)(nil)).Elem(),
4647
},
4748
NamedTypes: map[string]reflect.Type{
4849
"Action0": reflect.TypeOf((*q.Action0)(nil)).Elem(),
@@ -75,6 +76,7 @@ func init() {
7576
"SceneMgr": reflect.ValueOf(&q.SceneMgr),
7677
"SpriteMgr": reflect.ValueOf(&q.SpriteMgr),
7778
"TilemapMgr": reflect.ValueOf(&q.TilemapMgr),
79+
"TilemapparserMgr": reflect.ValueOf(&q.TilemapparserMgr),
7880
"TimeSinceGameStart": reflect.ValueOf(&q.TimeSinceGameStart),
7981
"UiMgr": reflect.ValueOf(&q.UiMgr),
8082
},
Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,54 @@
1-
/*------------------------------------------------------------------------------
2-
// This code was generated by template worker.wrap.gen.js.tmpl.
3-
//
4-
// Changes to this file may cause incorrect behavior and will be lost if
5-
// the code is regenerated. Any updates should be done in
6-
// "worker.wrap.gen.js.tmpl" so they can be included in the generated
7-
// code.
8-
//----------------------------------------------------------------------------*/
9-
function BindFFI(goBridge) {
10-
var ffi = {}
11-
ffi.gdspx_on_engine_start = goBridge.getGoFunction("gdspx_on_engine_start")
12-
ffi.gdspx_on_engine_update = goBridge.getGoFunction("gdspx_on_engine_update")
13-
ffi.gdspx_on_engine_fixed_update = goBridge.getGoFunction("gdspx_on_engine_fixed_update")
14-
ffi.gdspx_on_engine_destroy = goBridge.getGoFunction("gdspx_on_engine_destroy")
15-
ffi.gdspx_on_engine_reset = goBridge.getGoFunction("gdspx_on_engine_reset")
16-
ffi.gdspx_on_engine_pause = goBridge.getGoFunction("gdspx_on_engine_pause")
17-
ffi.gdspx_on_scene_sprite_instantiated = goBridge.getGoFunction("gdspx_on_scene_sprite_instantiated")
18-
ffi.gdspx_on_sprite_ready = goBridge.getGoFunction("gdspx_on_sprite_ready")
19-
ffi.gdspx_on_sprite_updated = goBridge.getGoFunction("gdspx_on_sprite_updated")
20-
ffi.gdspx_on_sprite_fixed_updated = goBridge.getGoFunction("gdspx_on_sprite_fixed_updated")
21-
ffi.gdspx_on_sprite_destroyed = goBridge.getGoFunction("gdspx_on_sprite_destroyed")
22-
ffi.gdspx_on_sprite_frames_set_changed = goBridge.getGoFunction("gdspx_on_sprite_frames_set_changed")
23-
ffi.gdspx_on_sprite_animation_changed = goBridge.getGoFunction("gdspx_on_sprite_animation_changed")
24-
ffi.gdspx_on_sprite_frame_changed = goBridge.getGoFunction("gdspx_on_sprite_frame_changed")
25-
ffi.gdspx_on_sprite_animation_looped = goBridge.getGoFunction("gdspx_on_sprite_animation_looped")
26-
ffi.gdspx_on_sprite_animation_finished = goBridge.getGoFunction("gdspx_on_sprite_animation_finished")
27-
ffi.gdspx_on_sprite_vfx_finished = goBridge.getGoFunction("gdspx_on_sprite_vfx_finished")
28-
ffi.gdspx_on_sprite_screen_exited = goBridge.getGoFunction("gdspx_on_sprite_screen_exited")
29-
ffi.gdspx_on_sprite_screen_entered = goBridge.getGoFunction("gdspx_on_sprite_screen_entered")
30-
ffi.gdspx_on_mouse_pressed = goBridge.getGoFunction("gdspx_on_mouse_pressed")
31-
ffi.gdspx_on_mouse_released = goBridge.getGoFunction("gdspx_on_mouse_released")
32-
ffi.gdspx_on_key_pressed = goBridge.getGoFunction("gdspx_on_key_pressed")
33-
ffi.gdspx_on_key_released = goBridge.getGoFunction("gdspx_on_key_released")
34-
ffi.gdspx_on_action_pressed = goBridge.getGoFunction("gdspx_on_action_pressed")
35-
ffi.gdspx_on_action_just_pressed = goBridge.getGoFunction("gdspx_on_action_just_pressed")
36-
ffi.gdspx_on_action_just_released = goBridge.getGoFunction("gdspx_on_action_just_released")
37-
ffi.gdspx_on_axis_changed = goBridge.getGoFunction("gdspx_on_axis_changed")
38-
ffi.gdspx_on_collision_enter = goBridge.getGoFunction("gdspx_on_collision_enter")
39-
ffi.gdspx_on_collision_stay = goBridge.getGoFunction("gdspx_on_collision_stay")
40-
ffi.gdspx_on_collision_exit = goBridge.getGoFunction("gdspx_on_collision_exit")
41-
ffi.gdspx_on_trigger_enter = goBridge.getGoFunction("gdspx_on_trigger_enter")
42-
ffi.gdspx_on_trigger_stay = goBridge.getGoFunction("gdspx_on_trigger_stay")
43-
ffi.gdspx_on_trigger_exit = goBridge.getGoFunction("gdspx_on_trigger_exit")
44-
ffi.gdspx_on_ui_ready = goBridge.getGoFunction("gdspx_on_ui_ready")
45-
ffi.gdspx_on_ui_updated = goBridge.getGoFunction("gdspx_on_ui_updated")
46-
ffi.gdspx_on_ui_destroyed = goBridge.getGoFunction("gdspx_on_ui_destroyed")
47-
ffi.gdspx_on_ui_pressed = goBridge.getGoFunction("gdspx_on_ui_pressed")
48-
ffi.gdspx_on_ui_released = goBridge.getGoFunction("gdspx_on_ui_released")
49-
ffi.gdspx_on_ui_hovered = goBridge.getGoFunction("gdspx_on_ui_hovered")
50-
ffi.gdspx_on_ui_clicked = goBridge.getGoFunction("gdspx_on_ui_clicked")
51-
ffi.gdspx_on_ui_toggle = goBridge.getGoFunction("gdspx_on_ui_toggle")
52-
ffi.gdspx_on_ui_text_changed = goBridge.getGoFunction("gdspx_on_ui_text_changed")
53-
return ffi
1+
/*------------------------------------------------------------------------------
2+
// This code was generated by template worker.wrap.gen.js.tmpl.
3+
//
4+
// Changes to this file may cause incorrect behavior and will be lost if
5+
// the code is regenerated. Any updates should be done in
6+
// "worker.wrap.gen.js.tmpl" so they can be included in the generated
7+
// code.
8+
//----------------------------------------------------------------------------*/
9+
function BindFFI(goBridge) {
10+
var ffi = {}
11+
ffi.gdspx_on_engine_start = goBridge.getGoFunction("gdspx_on_engine_start")
12+
ffi.gdspx_on_engine_update = goBridge.getGoFunction("gdspx_on_engine_update")
13+
ffi.gdspx_on_engine_fixed_update = goBridge.getGoFunction("gdspx_on_engine_fixed_update")
14+
ffi.gdspx_on_engine_destroy = goBridge.getGoFunction("gdspx_on_engine_destroy")
15+
ffi.gdspx_on_engine_reset = goBridge.getGoFunction("gdspx_on_engine_reset")
16+
ffi.gdspx_on_engine_pause = goBridge.getGoFunction("gdspx_on_engine_pause")
17+
ffi.gdspx_on_scene_sprite_instantiated = goBridge.getGoFunction("gdspx_on_scene_sprite_instantiated")
18+
ffi.gdspx_on_sprite_ready = goBridge.getGoFunction("gdspx_on_sprite_ready")
19+
ffi.gdspx_on_sprite_updated = goBridge.getGoFunction("gdspx_on_sprite_updated")
20+
ffi.gdspx_on_sprite_fixed_updated = goBridge.getGoFunction("gdspx_on_sprite_fixed_updated")
21+
ffi.gdspx_on_sprite_destroyed = goBridge.getGoFunction("gdspx_on_sprite_destroyed")
22+
ffi.gdspx_on_sprite_frames_set_changed = goBridge.getGoFunction("gdspx_on_sprite_frames_set_changed")
23+
ffi.gdspx_on_sprite_animation_changed = goBridge.getGoFunction("gdspx_on_sprite_animation_changed")
24+
ffi.gdspx_on_sprite_frame_changed = goBridge.getGoFunction("gdspx_on_sprite_frame_changed")
25+
ffi.gdspx_on_sprite_animation_looped = goBridge.getGoFunction("gdspx_on_sprite_animation_looped")
26+
ffi.gdspx_on_sprite_animation_finished = goBridge.getGoFunction("gdspx_on_sprite_animation_finished")
27+
ffi.gdspx_on_sprite_vfx_finished = goBridge.getGoFunction("gdspx_on_sprite_vfx_finished")
28+
ffi.gdspx_on_sprite_screen_exited = goBridge.getGoFunction("gdspx_on_sprite_screen_exited")
29+
ffi.gdspx_on_sprite_screen_entered = goBridge.getGoFunction("gdspx_on_sprite_screen_entered")
30+
ffi.gdspx_on_mouse_pressed = goBridge.getGoFunction("gdspx_on_mouse_pressed")
31+
ffi.gdspx_on_mouse_released = goBridge.getGoFunction("gdspx_on_mouse_released")
32+
ffi.gdspx_on_key_pressed = goBridge.getGoFunction("gdspx_on_key_pressed")
33+
ffi.gdspx_on_key_released = goBridge.getGoFunction("gdspx_on_key_released")
34+
ffi.gdspx_on_action_pressed = goBridge.getGoFunction("gdspx_on_action_pressed")
35+
ffi.gdspx_on_action_just_pressed = goBridge.getGoFunction("gdspx_on_action_just_pressed")
36+
ffi.gdspx_on_action_just_released = goBridge.getGoFunction("gdspx_on_action_just_released")
37+
ffi.gdspx_on_axis_changed = goBridge.getGoFunction("gdspx_on_axis_changed")
38+
ffi.gdspx_on_collision_enter = goBridge.getGoFunction("gdspx_on_collision_enter")
39+
ffi.gdspx_on_collision_stay = goBridge.getGoFunction("gdspx_on_collision_stay")
40+
ffi.gdspx_on_collision_exit = goBridge.getGoFunction("gdspx_on_collision_exit")
41+
ffi.gdspx_on_trigger_enter = goBridge.getGoFunction("gdspx_on_trigger_enter")
42+
ffi.gdspx_on_trigger_stay = goBridge.getGoFunction("gdspx_on_trigger_stay")
43+
ffi.gdspx_on_trigger_exit = goBridge.getGoFunction("gdspx_on_trigger_exit")
44+
ffi.gdspx_on_ui_ready = goBridge.getGoFunction("gdspx_on_ui_ready")
45+
ffi.gdspx_on_ui_updated = goBridge.getGoFunction("gdspx_on_ui_updated")
46+
ffi.gdspx_on_ui_destroyed = goBridge.getGoFunction("gdspx_on_ui_destroyed")
47+
ffi.gdspx_on_ui_pressed = goBridge.getGoFunction("gdspx_on_ui_pressed")
48+
ffi.gdspx_on_ui_released = goBridge.getGoFunction("gdspx_on_ui_released")
49+
ffi.gdspx_on_ui_hovered = goBridge.getGoFunction("gdspx_on_ui_hovered")
50+
ffi.gdspx_on_ui_clicked = goBridge.getGoFunction("gdspx_on_ui_clicked")
51+
ffi.gdspx_on_ui_toggle = goBridge.getGoFunction("gdspx_on_ui_toggle")
52+
ffi.gdspx_on_ui_text_changed = goBridge.getGoFunction("gdspx_on_ui_text_changed")
53+
return ffi
5454
}

cmd/igox/pkg/github.com/goplus/spx/v2/export.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func init() {
7070
NamedTypes: map[string]reflect.Type{
7171
"Color": reflect.TypeOf((*q.Color)(nil)).Elem(),
7272
"Config": reflect.TypeOf((*q.Config)(nil)).Elem(),
73+
"DecoratorJSON": reflect.TypeOf((*q.DecoratorJSON)(nil)).Elem(),
7374
"EffectKind": reflect.TypeOf((*q.EffectKind)(nil)).Elem(),
7475
"Game": reflect.TypeOf((*q.Game)(nil)).Elem(),
7576
"List": reflect.TypeOf((*q.List)(nil)).Elem(),

cmd/igox/pkg/github.com/goplus/spx/v2/pkg/gdspx/pkg/engine/export.go

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,25 @@ func init() {
2525
"sync": "sync",
2626
},
2727
Interfaces: map[string]reflect.Type{
28-
"IAudioMgr": reflect.TypeOf((*q.IAudioMgr)(nil)).Elem(),
29-
"ICameraMgr": reflect.TypeOf((*q.ICameraMgr)(nil)).Elem(),
30-
"IDebugMgr": reflect.TypeOf((*q.IDebugMgr)(nil)).Elem(),
31-
"IExtMgr": reflect.TypeOf((*q.IExtMgr)(nil)).Elem(),
32-
"IInputMgr": reflect.TypeOf((*q.IInputMgr)(nil)).Elem(),
33-
"ILifeCycle": reflect.TypeOf((*q.ILifeCycle)(nil)).Elem(),
34-
"IManager": reflect.TypeOf((*q.IManager)(nil)).Elem(),
35-
"INavigationMgr": reflect.TypeOf((*q.INavigationMgr)(nil)).Elem(),
36-
"IPenMgr": reflect.TypeOf((*q.IPenMgr)(nil)).Elem(),
37-
"IPhysicMgr": reflect.TypeOf((*q.IPhysicMgr)(nil)).Elem(),
38-
"IPlatformMgr": reflect.TypeOf((*q.IPlatformMgr)(nil)).Elem(),
39-
"IResMgr": reflect.TypeOf((*q.IResMgr)(nil)).Elem(),
40-
"ISceneMgr": reflect.TypeOf((*q.ISceneMgr)(nil)).Elem(),
41-
"ISpriteMgr": reflect.TypeOf((*q.ISpriteMgr)(nil)).Elem(),
42-
"ISpriter": reflect.TypeOf((*q.ISpriter)(nil)).Elem(),
43-
"ITilemapMgr": reflect.TypeOf((*q.ITilemapMgr)(nil)).Elem(),
44-
"IUiMgr": reflect.TypeOf((*q.IUiMgr)(nil)).Elem(),
45-
"IUiNode": reflect.TypeOf((*q.IUiNode)(nil)).Elem(),
28+
"IAudioMgr": reflect.TypeOf((*q.IAudioMgr)(nil)).Elem(),
29+
"ICameraMgr": reflect.TypeOf((*q.ICameraMgr)(nil)).Elem(),
30+
"IDebugMgr": reflect.TypeOf((*q.IDebugMgr)(nil)).Elem(),
31+
"IExtMgr": reflect.TypeOf((*q.IExtMgr)(nil)).Elem(),
32+
"IInputMgr": reflect.TypeOf((*q.IInputMgr)(nil)).Elem(),
33+
"ILifeCycle": reflect.TypeOf((*q.ILifeCycle)(nil)).Elem(),
34+
"IManager": reflect.TypeOf((*q.IManager)(nil)).Elem(),
35+
"INavigationMgr": reflect.TypeOf((*q.INavigationMgr)(nil)).Elem(),
36+
"IPenMgr": reflect.TypeOf((*q.IPenMgr)(nil)).Elem(),
37+
"IPhysicMgr": reflect.TypeOf((*q.IPhysicMgr)(nil)).Elem(),
38+
"IPlatformMgr": reflect.TypeOf((*q.IPlatformMgr)(nil)).Elem(),
39+
"IResMgr": reflect.TypeOf((*q.IResMgr)(nil)).Elem(),
40+
"ISceneMgr": reflect.TypeOf((*q.ISceneMgr)(nil)).Elem(),
41+
"ISpriteMgr": reflect.TypeOf((*q.ISpriteMgr)(nil)).Elem(),
42+
"ISpriter": reflect.TypeOf((*q.ISpriter)(nil)).Elem(),
43+
"ITilemapMgr": reflect.TypeOf((*q.ITilemapMgr)(nil)).Elem(),
44+
"ITilemapparserMgr": reflect.TypeOf((*q.ITilemapparserMgr)(nil)).Elem(),
45+
"IUiMgr": reflect.TypeOf((*q.IUiMgr)(nil)).Elem(),
46+
"IUiNode": reflect.TypeOf((*q.IUiNode)(nil)).Elem(),
4647
},
4748
NamedTypes: map[string]reflect.Type{
4849
"Action0": reflect.TypeOf((*q.Action0)(nil)).Elem(),
@@ -75,6 +76,7 @@ func init() {
7576
"SceneMgr": reflect.ValueOf(&q.SceneMgr),
7677
"SpriteMgr": reflect.ValueOf(&q.SpriteMgr),
7778
"TilemapMgr": reflect.ValueOf(&q.TilemapMgr),
79+
"TilemapparserMgr": reflect.ValueOf(&q.TilemapparserMgr),
7880
"TimeSinceGameStart": reflect.ValueOf(&q.TimeSinceGameStart),
7981
"UiMgr": reflect.ValueOf(&q.UiMgr),
8082
},

gdspx.go

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,21 @@ import (
2828

2929
// copy these variable to any namespace you want
3030
var (
31-
audioMgr enginewrap.AudioMgrImpl
32-
cameraMgr enginewrap.CameraMgrImpl
33-
inputMgr enginewrap.InputMgrImpl
34-
physicMgr enginewrap.PhysicMgrImpl
35-
platformMgr enginewrap.PlatformMgrImpl
36-
resMgr enginewrap.ResMgrImpl
37-
sceneMgr enginewrap.SceneMgrImpl
38-
spriteMgr enginewrap.SpriteMgrImpl
39-
uiMgr enginewrap.UiMgrImpl
40-
extMgr enginewrap.ExtMgrImpl
41-
penMgr enginewrap.PenMgrImpl
42-
debugMgr enginewrap.DebugMgrImpl
43-
navigationMgr enginewrap.NavigationMgrImpl
44-
tilemapMgr enginewrap.TilemapMgrImpl
31+
audioMgr enginewrap.AudioMgrImpl
32+
cameraMgr enginewrap.CameraMgrImpl
33+
inputMgr enginewrap.InputMgrImpl
34+
physicMgr enginewrap.PhysicMgrImpl
35+
platformMgr enginewrap.PlatformMgrImpl
36+
resMgr enginewrap.ResMgrImpl
37+
sceneMgr enginewrap.SceneMgrImpl
38+
spriteMgr enginewrap.SpriteMgrImpl
39+
uiMgr enginewrap.UiMgrImpl
40+
extMgr enginewrap.ExtMgrImpl
41+
penMgr enginewrap.PenMgrImpl
42+
debugMgr enginewrap.DebugMgrImpl
43+
navigationMgr enginewrap.NavigationMgrImpl
44+
tilemapMgr enginewrap.TilemapMgrImpl
45+
tilemapparserMgr enginewrap.TilemapparserMgrImpl
4546
)
4647

4748
var (

internal/enginewrap/sync.gen.go

Lines changed: 52 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,28 @@ resMgr enginewrap.ResMgrImpl
3030
sceneMgr enginewrap.SceneMgrImpl
3131
spriteMgr enginewrap.SpriteMgrImpl
3232
tilemapMgr enginewrap.TilemapMgrImpl
33+
tilemapparserMgr enginewrap.TilemapparserMgrImpl
3334
uiMgr enginewrap.UiMgrImpl
3435
3536
)
3637
*/
3738

3839
var (
39-
audioMgr AudioMgrImpl
40-
cameraMgr CameraMgrImpl
41-
debugMgr DebugMgrImpl
42-
extMgr ExtMgrImpl
43-
inputMgr InputMgrImpl
44-
navigationMgr NavigationMgrImpl
45-
penMgr PenMgrImpl
46-
physicMgr PhysicMgrImpl
47-
platformMgr PlatformMgrImpl
48-
resMgr ResMgrImpl
49-
sceneMgr SceneMgrImpl
50-
spriteMgr SpriteMgrImpl
51-
tilemapMgr TilemapMgrImpl
52-
uiMgr UiMgrImpl
40+
audioMgr AudioMgrImpl
41+
cameraMgr CameraMgrImpl
42+
debugMgr DebugMgrImpl
43+
extMgr ExtMgrImpl
44+
inputMgr InputMgrImpl
45+
navigationMgr NavigationMgrImpl
46+
penMgr PenMgrImpl
47+
physicMgr PhysicMgrImpl
48+
platformMgr PlatformMgrImpl
49+
resMgr ResMgrImpl
50+
sceneMgr SceneMgrImpl
51+
spriteMgr SpriteMgrImpl
52+
tilemapMgr TilemapMgrImpl
53+
tilemapparserMgr TilemapparserMgrImpl
54+
uiMgr UiMgrImpl
5355
)
5456

5557
type audioMgrImpl struct {
@@ -117,6 +119,11 @@ type tilemapMgrImpl struct {
117119
type TilemapMgrImpl struct {
118120
tilemapMgrImpl
119121
}
122+
type tilemapparserMgrImpl struct {
123+
}
124+
type TilemapparserMgrImpl struct {
125+
tilemapparserMgrImpl
126+
}
120127
type uiMgrImpl struct {
121128
}
122129
type UiMgrImpl struct {
@@ -1632,6 +1639,37 @@ func (pself *tilemapMgrImpl) ExitTilemapEditorMode() {
16321639
})
16331640
}
16341641

1642+
// ITilemapparserMgr
1643+
func (pself *tilemapparserMgrImpl) LoadTilemap(json_path string) {
1644+
callInMainThread(func() {
1645+
gdx.TilemapparserMgr.LoadTilemap(json_path)
1646+
})
1647+
}
1648+
func (pself *tilemapparserMgrImpl) UnloadTilemap(name string) {
1649+
callInMainThread(func() {
1650+
gdx.TilemapparserMgr.UnloadTilemap(name)
1651+
})
1652+
}
1653+
func (pself *tilemapparserMgrImpl) DestroyAllTilemaps() {
1654+
callInMainThread(func() {
1655+
gdx.TilemapparserMgr.DestroyAllTilemaps()
1656+
})
1657+
}
1658+
func (pself *tilemapparserMgrImpl) HasTilemap(name string) bool {
1659+
var _ret1 bool
1660+
callInMainThread(func() {
1661+
_ret1 = gdx.TilemapparserMgr.HasTilemap(name)
1662+
})
1663+
return _ret1
1664+
}
1665+
func (pself *tilemapparserMgrImpl) GetTilemapLayerCount(name string) int64 {
1666+
var _ret1 int64
1667+
callInMainThread(func() {
1668+
_ret1 = gdx.TilemapparserMgr.GetTilemapLayerCount(name)
1669+
})
1670+
return _ret1
1671+
}
1672+
16351673
// IUiMgr
16361674
func (pself *uiMgrImpl) BindNode(obj gdx.Object, rel_path string) gdx.Object {
16371675
var _ret1 gdx.Object

0 commit comments

Comments
 (0)