예제 #1
0
        public float GetFloat(GMKeyCode code)
        {
            FieldSet set   = codeMap[code];
            int      value = GetUserValue(set.gmField);

            return(GmUtil.IntToFloat(value));
        }
예제 #2
0
        public static Quaternion GetRotation(BuildObject buildObject)
        {
            Quaternion r = new Quaternion();

            r.w = GmUtil.IntToFloat(buildObject.rw);
            r.x = GmUtil.IntToFloat(buildObject.rx);
            r.y = GmUtil.IntToFloat(buildObject.ry);
            r.z = GmUtil.IntToFloat(buildObject.rz);
            return(r);
        }
예제 #3
0
 public Vector3 GetCharacterSpawnpoint(Character character)
 {
     if (character.worldx != 0 && character.worldz != 0)
     {
         float x = GmUtil.IntToFloat(character.worldx);
         float y = GmUtil.IntToFloat(character.worldy);
         float z = GmUtil.IntToFloat(character.worldz);
         return(new Vector3(x, y, z));
     }
     else
     {
         return(GmUtil.Infinity);
     }
 }