Skip to content

Instantly share code, notes, and snippets.

@unagisyan
Last active December 21, 2015 11:58
Show Gist options
  • Save unagisyan/6302164 to your computer and use it in GitHub Desktop.
Save unagisyan/6302164 to your computer and use it in GitHub Desktop.
--- aims-ver1.90a¥bin¥AIMS_dev.exeで実行
-- boot.lua
function boot_OnStart()
G.sample = loadGraphic("sample1.png");
A.sample = createActor(G.sample, 300, 300, 10, 'Player');
local hoge = sendMessage(A.sample, 'msgHoge', {scene_handle=iThisScene()});
hoge = hoge == nil and 'nil' or 'hoge';
debugOut('msgHoge return value:' .. hoge);
end
function boot_msgPlayer()
debugOut('Scene:boot:msgPlayer call ')
return true
end
-- player.lua
function Player_msgHoge(args)
debugOut('Actor:Player:msgHoge call ')
local hoge = sendSceneMessage(args.scene_handle, 'msgPlayer')
hoge = hoge == nil and 'nil' or 'hoge';
debugOut('msgScene return value:' .. hoge);
return true
end
--[[
debugOut
Actor:Player:msgHoge call
Scene:boot:msgPlayer call
msgScene return value:hoge
msgHoge return value:nil
--]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment