本文整理汇总了C#中ILuaState.IsNone方法的典型用法代码示例。如果您正苦于以下问题:C# ILuaState.IsNone方法的具体用法?C# ILuaState.IsNone怎么用?C# ILuaState.IsNone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ILuaState
的用法示例。
在下文中一共展示了ILuaState.IsNone方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: lua_Stop
private int lua_Stop(ILuaState lua)
{
if (lua.IsNone (2)) {
iTween.Stop();
}
LuaObject luaObj = LuaObject.GetLuaObject (lua, 2);
if (luaObj == null) {
Debug.Log ("this luaobj is nil ");
return 0;
} else if (lua.IsNoneOrNil (3) && lua.IsNoneOrNil (4)) {
iTween.Stop (luaObj.gameObject);
} else if (!lua.IsNoneOrNil (3) && lua.IsNoneOrNil (4)) {
string szType = lua.L_CheckString (3);
iTween.Stop (luaObj.gameObject,szType);
} else if (lua.IsNoneOrNil (3) && !lua.IsNoneOrNil (4)) {
bool isIncludeChild = lua.ToBoolean(4);
iTween.Stop(luaObj.gameObject,isIncludeChild);
}
return 0;
}
示例2: B_LoadFile
public static int B_LoadFile( ILuaState lua )
{
string fname = lua.L_OptString( 1, null );
string mode = lua.L_OptString( 2, null );
bool env = ! lua.IsNone( 3 );
var status = lua.L_LoadFileX( fname, mode );
if( status != ThreadStatus.LUA_OK && env )
{
lua.PushValue( 3 );
lua.SetUpvalue( -2, 1 ); // put before error message
return 2;
}
return LoadAux( lua, status );
}
示例3: B_Load
public static int B_Load( ILuaState lua )
{
ThreadStatus status;
string s = lua.ToString(1);
string mode = lua.L_OptString(3, "bt");
int env = (! lua.IsNone(4) ? 4 : 0); // `env' index or 0 if no `env'
if( s != null )
{
string chunkName = lua.L_OptString(2, s);
status = lua.L_LoadBufferX( s, chunkName, mode );
}
else // loading from a reader function
{
throw new System.NotImplementedException(); // TODO
}
return LoadAux( lua, status, env );
}
示例4: B_LoadFile
public static int B_LoadFile( ILuaState lua )
{
string fname = lua.L_OptString( 1, null );
string mode = lua.L_OptString( 2, null );
int env = (!lua.IsNone(3) ? 3 : 0); // `env' index or 0 if no `env'
var status = lua.L_LoadFileX( fname, mode );
return LoadAux(lua, status, env);
}