//------------------------------------------------------------------------- public void setPosition(EbVector3 pos) { EbVector3 pixel_pos = CCoordinate.logic2toolkitPos(pos); Vector3 cur_pos; cur_pos.x = pixel_pos.x; cur_pos.y = pixel_pos.y; cur_pos.z = mTransform.position.z; mTransform.position = cur_pos; }
//------------------------------------------------------------------------- public void setPosition(EbVector3 pos) { EbVector3 pixel_pos = CCoordinate.logic2toolkitPos(pos); pixel_pos += CLogicUtility.getVector2ByRotateAngle(mOffsetLocation, mDirection); Vector3 cur_pos; cur_pos.x = pixel_pos.x; cur_pos.y = pixel_pos.y; cur_pos.z = mTransform.position.z; mTransform.position = cur_pos; }
//------------------------------------------------------------------------- Vector2 pixel2logicPos(Vector2 origin) { EbVector3 vv = CCoordinate.pixel2logicPos(new EbVector3(origin.x, origin.y, 0)); return(new Vector2(vv.x, vv.y)); }