public Vector2 GetMousePressedPosition() { Vector2 tempPosition = touchPressedVector; touchPressedVector = new Vector2(); return(screenResolutionConvertManager.BigResizeConvert(tempPosition)); }
void OnGUI() { //draw map DrawMapBasedOnPlayMapManager(); //draw character float width = graphicResourceManager.bossSprite[0].width, height = graphicResourceManager.bossSprite[0].height; Vector2 drawPoint = screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.1F, 0.1F)); Vector2 drawScale = screenResolutionConvertManager.BigResizeConvert(new Vector2(width, height)); //DrawPartOfImageEasier(graphicResourceManager.bossSprite[0], drawPoint.x, drawPoint.y, drawScale.x, drawScale.y, 1.0F, 1.0F, width - 1.0F, height - 1.0F); DrawPartOfImageWithAutoCalculate(graphicResourceManager.bossSprite[0], drawPoint.x, drawPoint.y, drawScale.x, drawScale.y, 4.0F, 4.0F, 5); //draw text guiStyleManager.fontSize = screenResolutionConvertManager.CalculateBasedOnScreenResolutionFontSize(50.0F); GUI.Label(new Rect(screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.1F, 0.2F)), screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.3F, 0.1F))), readFile, guiStyleManager); GUI.Label(new Rect(screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.1F, 0.3F)), screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.3F, 0.1F))), readStoryFile, guiStyleManager); //ads GUI.Label(new Rect(screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.1F, 0.4F)), screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.3F, 0.1F))), adsWatchedStatus, guiStyleManager); if (GUI.Button(new Rect(screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.1F, 0.5F)), screenResolutionConvertManager.SmallToBigConvert(new Vector2(0.3F, 0.1F))), "Show Ads", guiStyleManager)) { adsWatchedStatus = "not watched"; gameAdsManager.ShowUnityAdsToClient(); } if (gameAdsManager.IsClientWatchedAds()) { adsWatchedStatus = "watched"; } }