File tree Expand file tree Collapse file tree 4 files changed +18
-28
lines changed Expand file tree Collapse file tree 4 files changed +18
-28
lines changed Original file line number Diff line number Diff line change 1
1
require('mobdebug').start()
2
- require('test002')
3
2
require('Resource')
4
3
5
- local Test=require("Test")
6
- local q=10
7
-
8
4
function Start()
9
- q=1000
10
5
print("lua start")
11
- print(q )
12
- Res:LoadAsset("xx ","sss ");
13
- test002:hello( )
14
- -- CS.GameMode.Resource.Load("hotfix", )
6
+ local tx=CS.UnityEngine.TextAsset( )
7
+ tx= Res:LoadAsset(tx,"hotfix ","Assets/Game/HotFix/Test.lua.txt ");
8
+ print(tx.text )
9
+ CS.UnityEngine.GameObject('lua test gameobject' )
15
10
end
16
11
17
12
function Update()
Original file line number Diff line number Diff line change 2
2
3
3
local gameMode=CS.GameFramework.Taurus.GameMode
4
4
5
- function Res:LoadAsset(ab,path)
6
- local tx=CS.UnityEngine.TextAsset( )
7
- tx =gameMode.Resource:LoadAsset(tx,"hotfix","Assets/Game/HotFix/Test.lua.txt" )
8
- print(tx.text)
9
- end
5
+ --@ 加载资源
6
+ function Res:LoadAsset(target,ab,path )
7
+ target =gameMode.Resource:LoadAsset(target,ab,path )
8
+ return target
9
+ end
Original file line number Diff line number Diff line change 1
1
require (' mobdebug' ).start ()
2
- require (' test002' )
3
2
require (' Resource' )
4
3
5
- local Test = require (" Test" )
6
- local q = 10
7
-
8
4
function Start ()
9
- q = 1000
10
5
print (" lua start" )
11
- print ( q )
12
- Res :LoadAsset (" xx " ," sss " );
13
- test002 : hello ( )
14
- -- CS.GameMode.Resource.Load("hotfix", )
6
+ local tx = CS . UnityEngine . TextAsset ( )
7
+ tx = Res :LoadAsset (tx , " hotfix " ," Assets/Game/HotFix/Test.lua.txt " );
8
+ print ( tx . text )
9
+ CS .UnityEngine . GameObject ( ' lua test gameobject ' )
15
10
end
16
11
17
12
function Update ()
Original file line number Diff line number Diff line change 2
2
3
3
local gameMode = CS .GameFramework .Taurus .GameMode
4
4
5
- function Res : LoadAsset ( ab , path )
6
- local tx = CS . UnityEngine . TextAsset ( )
7
- tx = gameMode .Resource :LoadAsset (tx , " hotfix " , " Assets/Game/HotFix/Test.lua.txt " )
8
- print ( tx . text )
9
- end
5
+ -- @ 加载资源
6
+ function Res : LoadAsset ( target , ab , path )
7
+ target = gameMode .Resource :LoadAsset (target , ab , path )
8
+ return target
9
+ end
You can’t perform that action at this time.
0 commit comments