实例化对象有问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user