public float GetX() { switch (type) { case 0: try { if (isBindGetPos) { if (methods != null) { if (methods[7] != null) { Object o = JavaRuntime.Invoke(methods[7], obj); if (o is Single) { return((Single)o); } else if (o is Int32) { return((Int32)o); } } } } } catch (Exception ex) { Log.Exception(ex); } break; case 1: if (actorObject != null) { return(actorObject.GetX()); } break; case 2: if (shapeObject != null) { return(shapeObject.GetX()); } break; case 3: if (compObject != null) { return(compObject.GetX()); } break; case 4: if (lObject != null) { return(lObject.GetX()); } break; } return(0); }