Esempio n. 1
0
 public object Kst(uint v)
 {
     if (v >= 0 && v < parent.Constants.Count)
     {
         ObjLuaConstant oci = (ObjLuaConstant)parent.Constants[(int)v];
         if (oci.InstructionType == ObjLuaConstant.Type.String)
         {
             return(oci.String);
         }
         else if (oci.InstructionType == ObjLuaConstant.Type.Number)
         {
             return(oci.Value);
         }
         else
         {
             return(nil);
         }
     }
     return(v.ToString());
 }
Esempio n. 2
0
 public string SKst(uint v)
 {
     if (v >= 0 && v < parent.Constants.Count)
     {
         ObjLuaConstant oci = (ObjLuaConstant)parent.Constants[(int)v];
         if (oci.InstructionType == ObjLuaConstant.Type.String)
         {
             return("\"" + oci.String.Replace("\\", "\\\\") + "\"");
         }
         else if (oci.InstructionType == ObjLuaConstant.Type.Number)
         {
             return(oci.Value.ToString());
         }
         else
         {
             return(nil.ToString());
         }
     }
     return(v.ToString());;
 }