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: {} - first:
data: Editor: Editor
first: second:
Editor: Editor enabled: 0
second: settings:
enabled: 0 DefaultValueInitialized: true
settings: - first:
DefaultValueInitialized: true Windows Store Apps: WindowsStoreApps
data: second:
first: enabled: 0
Windows Store Apps: WindowsStoreApps settings:
second: CPU: AnyCPU
enabled: 0
settings:
CPU: AnyCPU
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
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,7 +124,11 @@ public class CardDescription : Servant ...@@ -125,7 +124,11 @@ public class CardDescription : Servant
// 暴力适配 ios 刘海屏 // 暴力适配 ios 刘海屏
if (Screen.safeArea.x > 0) if (Screen.safeArea.x > 0)
{ {
offset = 66; if (Screen.width > 1920) {
offset = 80;
} else {
offset = 66;
}
} }
// 计算目标世界坐标 // 计算目标世界坐标
......
...@@ -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,
......
...@@ -189,9 +189,9 @@ public class DeckManager : ServantWithCardDescription ...@@ -189,9 +189,9 @@ public class DeckManager : ServantWithCardDescription
base.applyHideArrangement(); base.applyHideArrangement();
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();
} }
...@@ -201,10 +201,10 @@ gameObjectSearch.transform.DOMove(targetPos, 0.6f); ...@@ -201,10 +201,10 @@ gameObjectSearch.transform.DOMove(targetPos, 0.6f);
Program.cameraFacing = true; Program.cameraFacing = true;
UITexture tex = UIHelper.getByName<UITexture>(gameObjectSearch, "under_"); UITexture tex = UIHelper.getByName<UITexture>(gameObjectSearch, "under_");
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();
} }
......
...@@ -154,44 +154,6 @@ namespace YGOSharp ...@@ -154,44 +154,6 @@ namespace YGOSharp
this.Name = YGOSharp.CardsManager.nullName; this.Name = YGOSharp.CardsManager.nullName;
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