Commit a65e0301 authored by hex's avatar hex

fix high resolution screen area

parent 2bdbbbf3
fileFormatVersion: 2
guid: 4766ce01712076c4c8cb7899fac116b0
folderAsset: yes
timeCreated: 1475924533
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2 fileFormatVersion: 2
guid: f508b35d2051b414d835796de8dadae5 guid: f508b35d2051b414d835796de8dadae5
timeCreated: 1480605667
licenseType: Pro
PluginImporter: PluginImporter:
externalObjects: {}
serializedVersion: 2 serializedVersion: 2
iconMap: {} iconMap: {}
executionOrder: {} executionOrder: {}
isPreloaded: 0 isPreloaded: 0
isOverridable: 0 isOverridable: 0
platformData: platformData:
data: - first:
first:
Any: Any:
second: second:
enabled: 1 enabled: 1
settings: {} settings: {}
data: - first:
first:
Editor: Editor Editor: Editor
second: second:
enabled: 0 enabled: 0
settings: settings:
DefaultValueInitialized: true DefaultValueInitialized: true
data: - first:
first:
Windows Store Apps: WindowsStoreApps Windows Store Apps: WindowsStoreApps
second: second:
enabled: 0 enabled: 0
......
fileFormatVersion: 2
guid: f53581fb80be96f46b0cb1a267158562
timeCreated: 1480605668
licenseType: Pro
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Any:
second:
enabled: 1
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
data:
first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
...@@ -103,7 +103,6 @@ public class CardDescription : Servant ...@@ -103,7 +103,6 @@ public class CardDescription : Servant
if (gameObject != null) if (gameObject != null)
{ {
underSprite.height = Screen.height + 4; underSprite.height = Screen.height + 4;
// 计算目标世界坐标 // 计算目标世界坐标
Vector3 hidePosition = Program.camera_main_2d.ScreenToWorldPoint( Vector3 hidePosition = Program.camera_main_2d.ScreenToWorldPoint(
new Vector3(-underSprite.width - 20, Screen.height / 2, 0) new Vector3(-underSprite.width - 20, Screen.height / 2, 0)
...@@ -125,8 +124,12 @@ public class CardDescription : Servant ...@@ -125,8 +124,12 @@ public class CardDescription : Servant
// 暴力适配 ios 刘海屏 // 暴力适配 ios 刘海屏
if (Screen.safeArea.x > 0) if (Screen.safeArea.x > 0)
{ {
if (Screen.width > 1920) {
offset = 80;
} else {
offset = 66; offset = 66;
} }
}
// 计算目标世界坐标 // 计算目标世界坐标
Vector3 showPosition = Program.camera_main_2d.ScreenToWorldPoint( Vector3 showPosition = Program.camera_main_2d.ScreenToWorldPoint(
......
...@@ -129,7 +129,7 @@ public class Servant ...@@ -129,7 +129,7 @@ public class Servant
{ {
if (toolBar != null) if (toolBar != null)
{ {
Vector3 vectorOfHidedBar_Screen = new Vector3(Screen.width - RightToScreen, -100, 0); Vector3 vectorOfHidedBar_Screen = new Vector3(Screen.width - RightToScreen, -200, 0);
Vector3 targetWorldPosition = Program.camera_back_ground_2d.ScreenToWorldPoint(vectorOfHidedBar_Screen); Vector3 targetWorldPosition = Program.camera_back_ground_2d.ScreenToWorldPoint(vectorOfHidedBar_Screen);
toolBar.transform.DOMove(targetWorldPosition, 0.6f); toolBar.transform.DOMove(targetWorldPosition, 0.6f);
...@@ -292,7 +292,7 @@ public class Servant ...@@ -292,7 +292,7 @@ public class Servant
toolBar = create( toolBar = create(
mod, mod,
Program.camera_main_2d.ScreenToWorldPoint( Program.camera_main_2d.ScreenToWorldPoint(
new Vector3(Screen.width - RightToScreen, -100, 0) new Vector3(Screen.width - RightToScreen, -200, 0)
), ),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
false, false,
......
...@@ -190,8 +190,8 @@ public class DeckManager : ServantWithCardDescription ...@@ -190,8 +190,8 @@ public class DeckManager : ServantWithCardDescription
Program.cameraFacing = false; Program.cameraFacing = false;
Vector3 targetPos = Program.camera_main_2d.ScreenToWorldPoint( Vector3 targetPos = Program.camera_main_2d.ScreenToWorldPoint(
new Vector3(Screen.width + 600, Screen.height / 2, 600) new Vector3(Screen.width + 600, Screen.height / 2, 600)
); );
gameObjectSearch.transform.DOMove(targetPos, 0.6f); gameObjectSearch.transform.DOMove(targetPos, 0.6f);
refreshDetail(); refreshDetail();
} }
...@@ -203,8 +203,8 @@ gameObjectSearch.transform.DOMove(targetPos, 0.6f); ...@@ -203,8 +203,8 @@ gameObjectSearch.transform.DOMove(targetPos, 0.6f);
tex.height = Screen.height; tex.height = Screen.height;
Vector3 targetPos = Program.camera_main_2d.ScreenToWorldPoint( Vector3 targetPos = Program.camera_main_2d.ScreenToWorldPoint(
new Vector3(Screen.width - MAIN_PANEL_MARGIN_RIGHT, Screen.height / 2, 0) new Vector3(Screen.width - MAIN_PANEL_MARGIN_RIGHT, Screen.height / 2, 0)
); );
gameObjectSearch.transform.DOMove(targetPos, 0.6f); gameObjectSearch.transform.DOMove(targetPos, 0.6f);
refreshDetail(); refreshDetail();
} }
......
...@@ -155,43 +155,5 @@ namespace YGOSharp ...@@ -155,43 +155,5 @@ namespace YGOSharp
this.Desc = YGOSharp.CardsManager.nullString; this.Desc = YGOSharp.CardsManager.nullString;
} }
} }
//public class cardInPack
//{
// public int Id = 0;
// public string packShortNam = "";
// public string packFullName = "";
// public string reality = "";
// public int year = 0;
// public int month = 0;
// public int day = 0;
// internal cardInPack()
// {
// }
// internal cardInPack(IDataRecord reader)
// {
// try
// {
// Id = (int)reader.GetInt64(0);
// packShortNam = reader.GetString(1);
// packFullName = reader.GetString(2);
// reality = reader.GetString(3);
// string temp = reader.GetString(4);
// string[] mats = temp.Split("/");
// if (mats.Length == 3)
// {
// month = int.Parse(mats[0]);
// day = int.Parse(mats[1]);
// year = int.Parse(mats[2]);
// }
// }
// catch (Exception)
// {
// }
// }
//}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment