实例化对象有问题

This commit is contained in:
2022-03-11 21:52:14 +08:00
parent 6bdd6f637d
commit ce6413df51
7 changed files with 83 additions and 36 deletions

View File

@@ -731,6 +731,27 @@ static int New_STL(uint32_t v)
}
//new
static int Get_DragonModel(uint32_t v)
{
int Model = DargonModel_STL["op"];//龙盒模式
std::cout << DargonModel_STL["op"] << std::endl;
int ParameterNum = SQGetTop(v);
std::cout << ParameterNum << std::endl;
if (ParameterNum == 1)
{
SQPushInt(v, Model);
}
else
{
SQPushBool(v, false);
}
return 1;
}
//获取Squirrel v 基址
inline uint32_t GetSqVm()
{
@@ -774,4 +795,8 @@ void squirrel::R_Register_Nut()
RegisterNutApi(L"L_New_STL", New_STL);
RegisterNutApi(L"L_Set_STL", Set_STL);
RegisterNutApi(L"L_Get_STL", Get_STL);
RegisterNutApi(L"L_Get_DragonModel", Get_DragonModel);
}