你好。这里是翻译后的内容:
你好。 我正在尝试创建一个函数,生成3个对象,并且每个对象都有特定的创建代码。以下是我的代码:
function create_stage(_stage){
input_spr = placeholder_0
with (instance_create_depth(0, 0, 0, stage_operator)) {
stage = _stage
};
with (instance_create_depth(0, 0, 0, stage_projector)) {
stage = input_spr
};
instance_create_depth(0,0,0, stage_controller)
};
我打算在这里添加一个switch语句来改变输入精灵,但是现在我总是会得到一个错误,说变量input_spr在读取之前就没有被设置。但是,_stage却可以正常读取。 我在这里困惑了。
评论 (0)