Commit 3baf10f1 authored by 神楽坂玲奈's avatar 神楽坂玲奈

containers and cameras put in scene

parent 03f0c66b
...@@ -73,15 +73,15 @@ public class MonoCardInDeckManager : MonoBehaviour { ...@@ -73,15 +73,15 @@ public class MonoCardInDeckManager : MonoBehaviour {
{ {
float x = Input.mousePosition.x; float x = Input.mousePosition.x;
float y = Input.mousePosition.y; float y = Input.mousePosition.y;
Vector3 to_ltemp = Program.camera_game_main.ScreenToWorldPoint(new Vector3(x, y, 1)); Vector3 to_ltemp = Program.I().main_camera.ScreenToWorldPoint(new Vector3(x, y, 1));
Vector3 dv = to_ltemp - Program.camera_game_main.transform.position; Vector3 dv = to_ltemp - Program.I().main_camera.transform.position;
if (dv.y == 0) dv.y = 0.01f; if (dv.y == 0) dv.y = 0.01f;
to_ltemp.x = ((height - Program.camera_game_main.transform.position.y) to_ltemp.x = ((height - Program.I().main_camera.transform.position.y)
* (dv.x) / dv.y + Program.camera_game_main.transform.position.x); * (dv.x) / dv.y + Program.I().main_camera.transform.position.x);
to_ltemp.y = ((height - Program.camera_game_main.transform.position.y) to_ltemp.y = ((height - Program.I().main_camera.transform.position.y)
* (dv.y) / dv.y + Program.camera_game_main.transform.position.y); * (dv.y) / dv.y + Program.I().main_camera.transform.position.y);
to_ltemp.z = ((height - Program.camera_game_main.transform.position.y) to_ltemp.z = ((height - Program.I().main_camera.transform.position.y)
* (dv.z) / dv.y + Program.camera_game_main.transform.position.z); * (dv.z) / dv.y + Program.I().main_camera.transform.position.z);
return to_ltemp; return to_ltemp;
} }
...@@ -202,14 +202,14 @@ public class MonoCardInDeckManager : MonoBehaviour { ...@@ -202,14 +202,14 @@ public class MonoCardInDeckManager : MonoBehaviour {
public static Vector3 refLectPosition(Vector3 pos) public static Vector3 refLectPosition(Vector3 pos)
{ {
Vector3 to_ltemp = pos; Vector3 to_ltemp = pos;
Vector3 dv = to_ltemp - Program.camera_game_main.transform.position; Vector3 dv = to_ltemp - Program.I().main_camera.transform.position;
if (dv.y == 0) dv.y = 0.01f; if (dv.y == 0) dv.y = 0.01f;
to_ltemp.x = ((0 - Program.camera_game_main.transform.position.y) to_ltemp.x = ((0 - Program.I().main_camera.transform.position.y)
* (dv.x) / dv.y + Program.camera_game_main.transform.position.x); * (dv.x) / dv.y + Program.I().main_camera.transform.position.x);
to_ltemp.y = ((0 - Program.camera_game_main.transform.position.y) to_ltemp.y = ((0 - Program.I().main_camera.transform.position.y)
* (dv.y) / dv.y + Program.camera_game_main.transform.position.y); * (dv.y) / dv.y + Program.I().main_camera.transform.position.y);
to_ltemp.z = ((0 - Program.camera_game_main.transform.position.y) to_ltemp.z = ((0 - Program.I().main_camera.transform.position.y)
* (dv.z) / dv.y + Program.camera_game_main.transform.position.z); * (dv.z) / dv.y + Program.I().main_camera.transform.position.z);
return to_ltemp; return to_ltemp;
} }
} }
...@@ -4,8 +4,8 @@ using System.Collections; ...@@ -4,8 +4,8 @@ using System.Collections;
public class faceShower : MonoBehaviour { public class faceShower : MonoBehaviour {
void Start () { void Start () {
gameObject.transform.position = Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width/2,Screen.height*1.5f,0)); gameObject.transform.position = Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width/2,Screen.height*1.5f,0));
iTween.MoveToAction(gameObject, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height/2, 0)),0.6f,()=>{ iTween.MoveToAction(gameObject, Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height/2, 0)),0.6f,()=>{
iTween.ScaleToAction(gameObject,Vector3.zero, 0.6f, () => { iTween.ScaleToAction(gameObject,Vector3.zero, 0.6f, () => {
Destroy(gameObject); Destroy(gameObject);
}, 1f); }, 1f);
......
...@@ -17,12 +17,12 @@ public class handShower : MonoBehaviour ...@@ -17,12 +17,12 @@ public class handShower : MonoBehaviour
pics[2] = GameTextureManager.get("bu"); pics[2] = GameTextureManager.get("bu");
texture_0.mainTexture = pics[me]; texture_0.mainTexture = pics[me];
texture_1.mainTexture = pics[op]; texture_1.mainTexture = pics[op];
GameObject_0.transform.position = Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, -Screen.height * 1.5f, 0)); GameObject_0.transform.position = Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, -Screen.height * 1.5f, 0));
iTween.MoveToAction(GameObject_0, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2 - 80, 0)), 1f, () => { iTween.MoveToAction(GameObject_0, Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2 - 80, 0)), 1f, () => {
Destroy(GameObject_0,0.3f); Destroy(GameObject_0,0.3f);
}, 0); }, 0);
GameObject_1.transform.position = Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 0)); GameObject_1.transform.position = Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 0));
iTween.MoveToAction(GameObject_1, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2 + 80, 0)), 1f, () => { iTween.MoveToAction(GameObject_1, Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2 + 80, 0)), 1f, () => {
Destroy(GameObject_1, 0.3f); Destroy(GameObject_1, 0.3f);
}, 0); }, 0);
} }
......
...@@ -21,11 +21,11 @@ public class hinter : MonoBehaviour { ...@@ -21,11 +21,11 @@ public class hinter : MonoBehaviour {
void in_() void in_()
{ {
Vector3 screenPosition = Program.camera_main_2d.WorldToScreenPoint(gameObject.GetComponentInChildren<UITexture>().gameObject.transform.position); Vector3 screenPosition = Program.I().camera_main_2d.WorldToScreenPoint(gameObject.GetComponentInChildren<UITexture>().gameObject.transform.position);
screenPosition.y += 45; screenPosition.y += 45;
screenPosition.z = 0; screenPosition.z = 0;
Vector3 worldPositin = Program.camera_main_2d.ScreenToWorldPoint(screenPosition); Vector3 worldPositin = Program.I().camera_main_2d.ScreenToWorldPoint(screenPosition);
obj = Program.I().create(Program.I().mod_simple_ngui_text, worldPositin, Vector3.zero, true, Program.ui_main_2d, true); obj = Program.I().create(Program.I().mod_simple_ngui_text, worldPositin, Vector3.zero, true, Program.I().ui_main_2d, true);
obj.GetComponent<UILabel>().text = str; obj.GetComponent<UILabel>().text = str;
obj.GetComponent<UILabel>().effectStyle = UILabel.Effect.Outline; obj.GetComponent<UILabel>().effectStyle = UILabel.Effect.Outline;
Program.I().destroy(obj, 5f, false, false); Program.I().destroy(obj, 5f, false, false);
......
...@@ -1102,25 +1102,25 @@ public class UIPopupList : UIWidgetContainer ...@@ -1102,25 +1102,25 @@ public class UIPopupList : UIWidgetContainer
//if (gameObject.layer == Program.ui_back_ground_2d.layer) //if (gameObject.layer == Program.ui_back_ground_2d.layer)
//{ //{
// mChild.transform.SetParent(Program.ui_main_2d.transform, true); // mChild.transform.SetParent(Program.I().ui_main_2d.transform, true);
// var trans = mChild.GetComponentsInChildren<Transform>(); // var trans = mChild.GetComponentsInChildren<Transform>();
// foreach (var item in trans) // foreach (var item in trans)
// { // {
// item.gameObject.layer = Program.ui_main_2d.layer; // item.gameObject.layer = Program.I().ui_main_2d.layer;
// } // }
//} //}
if (gameObject.layer == Program.ui_main_3d.layer) if (gameObject.layer == Program.I().ui_main_3d.layer)
{ {
mChild.transform.SetParent(Program.ui_main_3d.transform, true); mChild.transform.SetParent(Program.I().ui_main_3d.transform, true);
} }
if (gameObject.layer == Program.ui_windows_2d.layer) if (gameObject.layer == Program.I().ui_windows_2d.layer)
{ {
mChild.transform.SetParent(Program.ui_windows_2d.transform, true); mChild.transform.SetParent(Program.I().ui_windows_2d.transform, true);
} }
if (gameObject.layer == Program.ui_main_2d.layer) if (gameObject.layer == Program.I().ui_main_2d.layer)
{ {
mChild.transform.SetParent(Program.ui_main_2d.transform, true); mChild.transform.SetParent(Program.I().ui_main_2d.transform, true);
} }
} }
} }
...@@ -1131,7 +1131,7 @@ public class UIPopupList : UIWidgetContainer ...@@ -1131,7 +1131,7 @@ public class UIPopupList : UIWidgetContainer
{ {
var a = go.transform.parent.localPosition; var a = go.transform.parent.localPosition;
if (go.layer != Program.ui_main_2d.layer&& go.layer != Program.ui_windows_2d.layer) if (go.layer != Program.I().ui_main_2d.layer&& go.layer != Program.I().ui_windows_2d.layer)
{ {
a.y -= delta * 100f; a.y -= delta * 100f;
a.z -= delta * 100f * 1.732f; a.z -= delta * 100f * 1.732f;
...@@ -1140,7 +1140,7 @@ public class UIPopupList : UIWidgetContainer ...@@ -1140,7 +1140,7 @@ public class UIPopupList : UIWidgetContainer
{ {
float whole = items.Count * 20; float whole = items.Count * 20;
float l=delta *100f; float l=delta *100f;
if (go.layer == Program.ui_windows_2d.layer) if (go.layer == Program.I().ui_windows_2d.layer)
{ {
l = delta * 50f; l = delta * 50f;
} }
......
...@@ -28,7 +28,7 @@ Transform: ...@@ -28,7 +28,7 @@ Transform:
m_GameObject: {fileID: 115194} m_GameObject: {fileID: 115194}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.005509642, y: 0.005509642, z: 0.005509642} m_LocalScale: {x: 0.0026041667, y: 0.0026041667, z: 0.0026041667}
m_Children: m_Children:
- {fileID: 471862} - {fileID: 471862}
m_Father: {fileID: 0} m_Father: {fileID: 0}
......
...@@ -8,7 +8,7 @@ public class BackGroundPic : Servant ...@@ -8,7 +8,7 @@ public class BackGroundPic : Servant
public override void initialize() public override void initialize()
{ {
backGround = create(Program.I().mod_simple_ngui_background_texture, Vector3.zero, Vector3.zero, false, backGround = create(Program.I().mod_simple_ngui_background_texture, Vector3.zero, Vector3.zero, false,
Program.ui_back_ground_2d); Program.I().ui_back_ground_2d);
var file = new FileStream("texture/common/desk.jpg", FileMode.Open, FileAccess.Read); var file = new FileStream("texture/common/desk.jpg", FileMode.Open, FileAccess.Read);
file.Seek(0, SeekOrigin.Begin); file.Seek(0, SeekOrigin.Begin);
var data = new byte[file.Length]; var data = new byte[file.Length];
...@@ -24,8 +24,7 @@ public class BackGroundPic : Servant ...@@ -24,8 +24,7 @@ public class BackGroundPic : Servant
public override void applyShowArrangement() public override void applyShowArrangement()
{ {
var root = Program.ui_back_ground_2d.GetComponent<UIRoot>(); var s = (float) Utils.UIHeight() / Screen.height;
var s = (float) root.activeHeight / Screen.height;
var tex = backGround.GetComponent<UITexture>().mainTexture; var tex = backGround.GetComponent<UITexture>().mainTexture;
var ss = tex.height / (float) tex.width; var ss = tex.height / (float) tex.width;
var width = (int) (Screen.width * s); var width = (int) (Screen.width * s);
......
...@@ -47,7 +47,7 @@ public class Book : WindowServant2D ...@@ -47,7 +47,7 @@ public class Book : WindowServant2D
base.preFrameFunction(); base.preFrameFunction();
if (isShowed) if (isShowed)
{ {
gameObject.transform.position = Program.camera_main_2d.ScreenToWorldPoint( gameObject.transform.position = Program.I().camera_main_2d.ScreenToWorldPoint(
new Vector3(Program.I().cardDescription.width / 2, new Vector3(Program.I().cardDescription.width / 2,
(Screen.height - Program.I().cardDescription.cHeight) / 2, 0)); (Screen.height - Program.I().cardDescription.cHeight) / 2, 0));
texts.back.width = (int) Program.I().cardDescription.width; texts.back.width = (int) Program.I().cardDescription.width;
......
...@@ -48,10 +48,10 @@ public class CardDescription : Servant ...@@ -48,10 +48,10 @@ public class CardDescription : Servant
gameObject = create gameObject = create
( (
Program.I().new_ui_cardDescription, Program.I().new_ui_cardDescription,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(-256, 0, 600)),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
true, true,
Program.ui_back_ground_2d Program.I().ui_back_ground_2d
); );
picLoader = gameObject.AddComponent<cardPicLoader>(); picLoader = gameObject.AddComponent<cardPicLoader>();
picLoader.code = 0; picLoader.code = 0;
...@@ -124,9 +124,10 @@ public class CardDescription : Servant ...@@ -124,9 +124,10 @@ public class CardDescription : Servant
{ {
if (gameObject != null) if (gameObject != null)
{ {
underSprite.height = Screen.height + 4; underSprite.height = Utils.UIHeight() + 4;
iTween.MoveTo(gameObject, iTween.MoveTo(gameObject,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-underSprite.width - 20, Screen.height / 2, 0)), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(-underSprite.width - 20,
(float) Utils.UIHeight() / 2, 0)),
1.2f); 1.2f);
setTitle(""); setTitle("");
resizer.gameObject.GetComponent<BoxCollider>().enabled = false; resizer.gameObject.GetComponent<BoxCollider>().enabled = false;
...@@ -137,8 +138,9 @@ public class CardDescription : Servant ...@@ -137,8 +138,9 @@ public class CardDescription : Servant
{ {
if (gameObject != null) if (gameObject != null)
{ {
underSprite.height = Screen.height + 4; underSprite.height = Utils.UIHeight() + 4;
iTween.MoveTo(gameObject, Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-2, Screen.height / 2, 0)), iTween.MoveTo(gameObject,
Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(-2, (float) Utils.UIHeight() / 2, 0)),
1.2f); 1.2f);
resizer.gameObject.GetComponent<BoxCollider>().enabled = true; resizer.gameObject.GetComponent<BoxCollider>().enabled = true;
} }
...@@ -150,10 +152,10 @@ public class CardDescription : Servant ...@@ -150,10 +152,10 @@ public class CardDescription : Servant
{ {
var ca = int.Parse(Config.Get("CA", "230")); var ca = int.Parse(Config.Get("CA", "230"));
var cb = int.Parse(Config.Get("CB", "270")); var cb = int.Parse(Config.Get("CB", "270"));
if (cb > Screen.height) if (cb > Utils.UIHeight())
{ {
// some dumb ass repack the program and set the pic size so large that small screen users can't realize there is card description under it. // some dumb ass repack the program and set the pic size so large that small screen users can't realize there is card description under it.
cb = Screen.height / 2; cb = Utils.UIHeight() / 2;
ca = (int) (cb * 0.68) + 50; ca = (int) (cb * 0.68) + 50;
} }
......
...@@ -13,7 +13,7 @@ public class TextMaster ...@@ -13,7 +13,7 @@ public class TextMaster
position, position,
new Vector3(60, 0, 0), new Vector3(60, 0, 0),
true, true,
Program.ui_main_3d, Program.I().ui_main_3d,
false false
); );
UIHelper.clearITWeen(gameObject); UIHelper.clearITWeen(gameObject);
...@@ -23,10 +23,10 @@ public class TextMaster ...@@ -23,10 +23,10 @@ public class TextMaster
{ {
gameObject = Program.I().ocgcore.create_s( gameObject = Program.I().ocgcore.create_s(
Program.I().mod_simple_ngui_text, Program.I().mod_simple_ngui_text,
Program.camera_main_2d.ScreenToWorldPoint(position), Program.I().camera_main_2d.ScreenToWorldPoint(position),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
true, true,
Program.ui_main_2d Program.I().ui_main_2d
); );
} }
......
...@@ -828,8 +828,8 @@ public static class UIHelper ...@@ -828,8 +828,8 @@ public static class UIHelper
internal static Vector3 getCamGoodPosition(Vector3 v, float l) internal static Vector3 getCamGoodPosition(Vector3 v, float l)
{ {
var screenposition = Program.camera_game_main.WorldToScreenPoint(v); var screenposition = Program.I().main_camera.WorldToScreenPoint(v);
return Program.camera_game_main.ScreenToWorldPoint(new Vector3(screenposition.x, screenposition.y, return Program.I().main_camera.ScreenToWorldPoint(new Vector3(screenposition.x, screenposition.y,
screenposition.z + l)); screenposition.z + l));
} }
...@@ -955,9 +955,9 @@ public static class UIHelper ...@@ -955,9 +955,9 @@ public static class UIHelper
internal static float getScreenDistance(GameObject a, GameObject b) internal static float getScreenDistance(GameObject a, GameObject b)
{ {
var sa = Program.camera_game_main.WorldToScreenPoint(a.transform.position); var sa = Program.I().main_camera.WorldToScreenPoint(a.transform.position);
sa.z = 0; sa.z = 0;
var sb = Program.camera_game_main.WorldToScreenPoint(b.transform.position); var sb = Program.I().main_camera.WorldToScreenPoint(b.transform.position);
sb.z = 0; sb.z = 0;
return Vector3.Distance(sa, sb); return Vector3.Distance(sa, sb);
} }
......
...@@ -28,8 +28,8 @@ public class gameButton : OCGobject ...@@ -28,8 +28,8 @@ public class gameButton : OCGobject
{ {
if (gameObject == null) if (gameObject == null)
{ {
gameObject = create(Program.I().new_ui_superButton, Program.camera_main_2d.ScreenToWorldPoint(v), gameObject = create(Program.I().new_ui_superButton, Program.I().camera_main_2d.ScreenToWorldPoint(v),
Vector3.zero, false, Program.ui_main_2d); Vector3.zero, false, Program.I().ui_main_2d);
gameObjectEvent = UIHelper.getRealEventGameObject(gameObject); gameObjectEvent = UIHelper.getRealEventGameObject(gameObject);
UIHelper.registEvent(gameObject, clicked); UIHelper.registEvent(gameObject, clicked);
gameObject.GetComponent<iconSetForButton>().setTexture(type); gameObject.GetComponent<iconSetForButton>().setTexture(type);
...@@ -40,7 +40,7 @@ public class gameButton : OCGobject ...@@ -40,7 +40,7 @@ public class gameButton : OCGobject
0.2f); 0.2f);
} }
gameObject.transform.position = Program.camera_main_2d.ScreenToWorldPoint(v); gameObject.transform.position = Program.I().camera_main_2d.ScreenToWorldPoint(v);
} }
private void clicked() private void clicked()
......
...@@ -83,7 +83,7 @@ public class GameField : OCGobject ...@@ -83,7 +83,7 @@ public class GameField : OCGobject
public GameField() public GameField()
{ {
gameObject = create(Program.I().new_ocgcore_field, getGoodPosition(), Vector3.zero, false, gameObject = create(Program.I().new_ocgcore_field, getGoodPosition(), Vector3.zero, false,
Program.ui_container_3d, false); Program.I().ui_container_3d, false);
UIHelper.getByName(gameObject, "obj_0").transform.localScale = Vector3.zero; UIHelper.getByName(gameObject, "obj_0").transform.localScale = Vector3.zero;
UIHelper.getByName(gameObject, "obj_1").transform.localScale = Vector3.zero; UIHelper.getByName(gameObject, "obj_1").transform.localScale = Vector3.zero;
Phase = gameObject.GetComponentInChildren<phaser>(); Phase = gameObject.GetComponentInChildren<phaser>();
...@@ -138,7 +138,7 @@ public class GameField : OCGobject ...@@ -138,7 +138,7 @@ public class GameField : OCGobject
label = create(Program.I().mod_simple_ngui_text, new Vector3(0, 0, -14.5f), new Vector3(60, 0, 0), false, label = create(Program.I().mod_simple_ngui_text, new Vector3(0, 0, -14.5f), new Vector3(60, 0, 0), false,
Program.ui_container_3d, false).GetComponent<UILabel>(); Program.I().ui_container_3d, false).GetComponent<UILabel>();
label.fontSize = 40; label.fontSize = 40;
label.overflowMethod = UILabel.Overflow.ShrinkContent; label.overflowMethod = UILabel.Overflow.ShrinkContent;
label.alignment = NGUIText.Alignment.Left; label.alignment = NGUIText.Alignment.Left;
...@@ -573,7 +573,7 @@ public class GameField : OCGobject ...@@ -573,7 +573,7 @@ public class GameField : OCGobject
if (Ocgcore.inSkiping) return; if (Ocgcore.inSkiping) return;
if (only) destroy(big_string); if (only) destroy(big_string);
big_string = create(Program.I().New_phase, Program.I().ocgcore.centre(), Vector3.zero, false, big_string = create(Program.I().New_phase, Program.I().ocgcore.centre(), Vector3.zero, false,
Program.ui_main_2d, true, Program.I().ui_main_2d, true,
new Vector3(Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize, new Vector3(Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize,
Screen.height / 1000f * Program.fieldSize)); Screen.height / 1000f * Program.fieldSize));
big_string.GetComponentInChildren<UITexture>().mainTexture = tex; big_string.GetComponentInChildren<UITexture>().mainTexture = tex;
...@@ -705,13 +705,13 @@ public class GameField : OCGobject ...@@ -705,13 +705,13 @@ public class GameField : OCGobject
if (player == 0) if (player == 0)
{ {
screen_p = new Vector3(Program.I().ocgcore.getScreenCenter(), 100f, 5); screen_p = new Vector3(Program.I().ocgcore.getScreenCenter(), 100f, 5);
position = Program.camera_game_main.ScreenToWorldPoint(new Vector3(Program.I().ocgcore.getScreenCenter(), position = Program.I().main_camera.ScreenToWorldPoint(new Vector3(Program.I().ocgcore.getScreenCenter(),
100f, 5)); 100f, 5));
} }
else else
{ {
screen_p = new Vector3(Program.I().ocgcore.getScreenCenter(), Screen.height - 100f, 5); screen_p = new Vector3(Program.I().ocgcore.getScreenCenter(), Screen.height - 100f, 5);
position = Program.camera_game_main.ScreenToWorldPoint(new Vector3(Program.I().ocgcore.getScreenCenter(), position = Program.I().main_camera.ScreenToWorldPoint(new Vector3(Program.I().ocgcore.getScreenCenter(),
Screen.height - 100f, 5)); Screen.height - 100f, 5));
} }
...@@ -754,7 +754,7 @@ public class GameField : OCGobject ...@@ -754,7 +754,7 @@ public class GameField : OCGobject
if (player == 0) if (player == 0)
{ {
Program.I().ocgcore.Sleep((int) (60 * (float) amount / 2500f)); Program.I().ocgcore.Sleep((int) (60 * (float) amount / 2500f));
iTween.ShakePosition(Program.camera_game_main.gameObject, iTween.Hash( iTween.ShakePosition(Program.I().main_camera.gameObject, iTween.Hash(
"x", amount / 1500f, "x", amount / 1500f,
"y", amount / 1500f, "y", amount / 1500f,
"z", amount / 1500f, "z", amount / 1500f,
...@@ -796,7 +796,7 @@ public class GameField : OCGobject ...@@ -796,7 +796,7 @@ public class GameField : OCGobject
// text_mesh.alignment = TMPro.TextAlignmentOptions.Center; // text_mesh.alignment = TMPro.TextAlignmentOptions.Center;
// Vector3 screenP = Program.camera_game_main.WorldToScreenPoint(Vector3.zero); // Vector3 screenP = Program.I().main_camera.WorldToScreenPoint(Vector3.zero);
// screenP.z = 18f; // screenP.z = 18f;
// int bun = Screen.height / 3; // int bun = Screen.height / 3;
// if (screenP.y > Screen.height / 2 + bun) // if (screenP.y > Screen.height / 2 + bun)
...@@ -807,7 +807,7 @@ public class GameField : OCGobject ...@@ -807,7 +807,7 @@ public class GameField : OCGobject
// { // {
// screenP.y = Screen.height / 2 - bun; // screenP.y = Screen.height / 2 - bun;
// } // }
// big_string.transform.position = Program.camera_game_main.ScreenToWorldPoint(screenP); // big_string.transform.position = Program.I().main_camera.ScreenToWorldPoint(screenP);
// big_string.AddComponent<animation_screen_lock2>(); // big_string.AddComponent<animation_screen_lock2>();
// big_string.transform.localScale = Vector3.zero; // big_string.transform.localScale = Vector3.zero;
......
...@@ -165,7 +165,7 @@ public class gameHiddenButton : OCGobject ...@@ -165,7 +165,7 @@ public class gameHiddenButton : OCGobject
Program.I().book.lab = Program.I().book.lab =
create(Program.I().New_decker, Vector3.zero, Vector3.zero, false, Program.ui_main_2d) create(Program.I().New_decker, Vector3.zero, Vector3.zero, false, Program.I().ui_main_2d)
.GetComponent<UILabel>(); .GetComponent<UILabel>();
Program.I().book.realize(); Program.I().book.realize();
...@@ -174,7 +174,7 @@ public class gameHiddenButton : OCGobject ...@@ -174,7 +174,7 @@ public class gameHiddenButton : OCGobject
screenPosition.x -= 90; screenPosition.x -= 90;
screenPosition.y += Program.I().book.lab.height / 4; screenPosition.y += Program.I().book.lab.height / 4;
screenPosition.z = 0; screenPosition.z = 0;
var worldPositin = Program.camera_main_2d.ScreenToWorldPoint(screenPosition); var worldPositin = Program.I().camera_main_2d.ScreenToWorldPoint(screenPosition);
Program.I().book.lab.transform.position = worldPositin; Program.I().book.lab.transform.position = worldPositin;
return; return;
...@@ -192,7 +192,7 @@ public class gameHiddenButton : OCGobject ...@@ -192,7 +192,7 @@ public class gameHiddenButton : OCGobject
Program.I().book.labop = Program.I().book.labop =
create(Program.I().New_decker, Vector3.zero, Vector3.zero, false, Program.ui_main_2d) create(Program.I().New_decker, Vector3.zero, Vector3.zero, false, Program.I().ui_main_2d)
.GetComponent<UILabel>(); .GetComponent<UILabel>();
Program.I().book.realize(); Program.I().book.realize();
...@@ -201,7 +201,7 @@ public class gameHiddenButton : OCGobject ...@@ -201,7 +201,7 @@ public class gameHiddenButton : OCGobject
screenPosition.x -= 90; screenPosition.x -= 90;
screenPosition.y -= Program.I().book.labop.height / 4; screenPosition.y -= Program.I().book.labop.height / 4;
screenPosition.z = 0; screenPosition.z = 0;
var worldPositin = Program.camera_main_2d.ScreenToWorldPoint(screenPosition); var worldPositin = Program.I().camera_main_2d.ScreenToWorldPoint(screenPosition);
Program.I().book.labop.transform.position = worldPositin; Program.I().book.labop.transform.position = worldPositin;
return; return;
......
...@@ -480,7 +480,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -480,7 +480,7 @@ public class Ocgcore : ServantWithCardDescription
Vector3.zero, Vector3.zero,
Vector3.zero, Vector3.zero,
false, false,
Program.ui_back_ground_2d Program.I().ui_back_ground_2d
).GetComponent<gameInfo>(); ).GetComponent<gameInfo>();
gameInfo.ini(); gameInfo.ini();
UIHelper.InterGameObject(gameInfo.gameObject); UIHelper.InterGameObject(gameInfo.gameObject);
...@@ -1666,7 +1666,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -1666,7 +1666,7 @@ public class Ocgcore : ServantWithCardDescription
} }
var handres = create(Program.I().new_ui_handShower, Vector3.zero, Vector3.zero, false, var handres = create(Program.I().new_ui_handShower, Vector3.zero, Vector3.zero, false,
Program.ui_main_2d); Program.I().ui_main_2d);
destroy(handres, 10f); destroy(handres, 10f);
Sleep(60); Sleep(60);
break; break;
...@@ -2339,7 +2339,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2339,7 +2339,7 @@ public class Ocgcore : ServantWithCardDescription
EventDelegate.Execute(UIHelper.getByName<UIButton>(toolBar, "stop_").onClick); EventDelegate.Execute(UIHelper.getByName<UIButton>(toolBar, "stop_").onClick);
RMSshow_clear(); RMSshow_clear();
var real = (Program.fieldSize - 1) * 0.9f + 1f; var real = (Program.fieldSize - 1) * 0.9f + 1f;
var point = Program.camera_game_main.WorldToScreenPoint(new Vector3(0, 0, -5.65f * real)); var point = Program.I().main_camera.WorldToScreenPoint(new Vector3(0, 0, -5.65f * real));
point.z = 2; point.z = 2;
if (Program.I().setting.setting.Vwin.value) if (Program.I().setting.setting.Vwin.value)
{ {
...@@ -2356,10 +2356,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2356,10 +2356,10 @@ public class Ocgcore : ServantWithCardDescription
winCaculator = create winCaculator = create
( (
Program.I().New_winCaculatorRecord, Program.I().New_winCaculatorRecord,
Program.camera_main_2d.ScreenToWorldPoint(point), Program.I().camera_main_2d.ScreenToWorldPoint(point),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
).GetComponent<lazyWin>(); ).GetComponent<lazyWin>();
...@@ -2369,10 +2369,10 @@ public class Ocgcore : ServantWithCardDescription ...@@ -2369,10 +2369,10 @@ public class Ocgcore : ServantWithCardDescription
winCaculator = create winCaculator = create
( (
Program.I().New_winCaculator, Program.I().New_winCaculator,
Program.camera_main_2d.ScreenToWorldPoint(point), Program.I().camera_main_2d.ScreenToWorldPoint(point),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
).GetComponent<lazyWin>(); ).GetComponent<lazyWin>();
...@@ -4343,7 +4343,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4343,7 +4343,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper.playSound("addcounter", 1); UIHelper.playSound("addcounter", 1);
//if (Program.YGOPro1 == false) //if (Program.YGOPro1 == false)
{ {
var pos = UIHelper.get_close(card.gameObject.transform.position, Program.camera_game_main, var pos = UIHelper.get_close(card.gameObject.transform.position, Program.I().main_camera,
5); 5);
Object.Destroy(Object.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), Object.Destroy(Object.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity),
5f); 5f);
...@@ -4365,7 +4365,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4365,7 +4365,7 @@ public class Ocgcore : ServantWithCardDescription
UIHelper.playSound("removecounter", 1); UIHelper.playSound("removecounter", 1);
//if (Program.YGOPro1 == false) //if (Program.YGOPro1 == false)
{ {
var pos = UIHelper.get_close(card.gameObject.transform.position, Program.camera_game_main, var pos = UIHelper.get_close(card.gameObject.transform.position, Program.I().main_camera,
5); 5);
Object.Destroy(Object.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity), Object.Destroy(Object.Instantiate(Program.I().mod_ocgcore_cs_end, pos, Quaternion.identity),
5f); 5f);
...@@ -4483,7 +4483,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4483,7 +4483,7 @@ public class Ocgcore : ServantWithCardDescription
r.ReadByte(); r.ReadByte();
UIHelper.playSound("explode", 0.4f); UIHelper.playSound("explode", 0.4f);
var amount = (int) (Mathf.Clamp(attackCard.get_data().Attack, 0, 3500) * 0.8f); var amount = (int) (Mathf.Clamp(attackCard.get_data().Attack, 0, 3500) * 0.8f);
iTween.ShakePosition(Program.camera_game_main.gameObject, iTween.Hash( iTween.ShakePosition(Program.I().main_camera.gameObject, iTween.Hash(
"x", amount / 1500f, "x", amount / 1500f,
"y", amount / 1500f, "y", amount / 1500f,
"z", amount / 1500f, "z", amount / 1500f,
...@@ -4787,9 +4787,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -4787,9 +4787,9 @@ public class Ocgcore : ServantWithCardDescription
{ {
if (waitObject == null) if (waitObject == null)
waitObject = create_s(Program.I().new_ocgcore_wait, waitObject = create_s(Program.I().new_ocgcore_wait,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(getScreenCenter(), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(getScreenCenter(),
Screen.height - 15f - 15f * (1.21f - Program.fieldSize) / 0.21f)), Vector3.zero, true, Screen.height - 15f - 15f * (1.21f - Program.fieldSize) / 0.21f)), Vector3.zero, true,
Program.ui_main_2d); Program.I().ui_main_2d);
} }
private void removeAttackHandler() private void removeAttackHandler()
...@@ -6848,9 +6848,9 @@ public class Ocgcore : ServantWithCardDescription ...@@ -6848,9 +6848,9 @@ public class Ocgcore : ServantWithCardDescription
base.show(); base.show();
Program.I().light.transform.eulerAngles = new Vector3(50, -50, 0); Program.I().light.transform.eulerAngles = new Vector3(50, -50, 0);
Program.cameraPosition = new Vector3(0, 23, -18.5f - 3.2f * (Program.fieldSize - 1f) / 0.21f); Program.cameraPosition = new Vector3(0, 23, -18.5f - 3.2f * (Program.fieldSize - 1f) / 0.21f);
Program.camera_game_main.transform.position = Program.cameraPosition * 1.5f; Program.I().main_camera.transform.position = Program.cameraPosition * 1.5f;
Program.cameraRotation = new Vector3(60, 0, 0); Program.cameraRotation = new Vector3(60, 0, 0);
Program.camera_game_main.transform.eulerAngles = Program.cameraRotation; Program.I().main_camera.transform.eulerAngles = Program.cameraRotation;
Program.reMoveCam(getScreenCenter()); Program.reMoveCam(getScreenCenter());
gameField = new GameField(); gameField = new GameField();
if (paused) if (paused)
...@@ -7671,7 +7671,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7671,7 +7671,7 @@ public class Ocgcore : ServantWithCardDescription
if (texture != null) if (texture != null)
{ {
RemoveUpdateAction_s(animation_show_card_code_handler); RemoveUpdateAction_s(animation_show_card_code_handler);
//Vector3 position = Program.camera_game_main.ScreenToWorldPoint(new Vector3(getScreenCenter(), Screen.height / 2f, 10)); //Vector3 position = Program.I().main_camera.ScreenToWorldPoint(new Vector3(getScreenCenter(), Screen.height / 2f, 10));
//GameObject obj = create_s(Program.I().mod_simple_quad); //GameObject obj = create_s(Program.I().mod_simple_quad);
//obj.AddComponent<animation_screen_lock>().screen_point = new Vector3(getScreenCenter(), Screen.height / 2f, 6); //obj.AddComponent<animation_screen_lock>().screen_point = new Vector3(getScreenCenter(), Screen.height / 2f, 6);
//obj.transform.eulerAngles = new Vector3(60, 0, 0); //obj.transform.eulerAngles = new Vector3(60, 0, 0);
...@@ -7681,7 +7681,7 @@ public class Ocgcore : ServantWithCardDescription ...@@ -7681,7 +7681,7 @@ public class Ocgcore : ServantWithCardDescription
//destroy(obj, 1f); //destroy(obj, 1f);
var shower = var shower =
create(Program.I().Pro1_CardShower, Program.I().ocgcore.centre(), Vector3.zero, false, create(Program.I().Pro1_CardShower, Program.I().ocgcore.centre(), Vector3.zero, false,
Program.ui_main_2d).GetComponent<pro1CardShower>(); Program.I().ui_main_2d).GetComponent<pro1CardShower>();
shower.card.mainTexture = texture; shower.card.mainTexture = texture;
shower.mask.mainTexture = GameTextureManager.Mask; shower.mask.mainTexture = GameTextureManager.Mask;
shower.disable.mainTexture = GameTextureManager.negated; shower.disable.mainTexture = GameTextureManager.negated;
......
...@@ -15,13 +15,24 @@ public class Program : MonoBehaviour ...@@ -15,13 +15,24 @@ public class Program : MonoBehaviour
#region Resources #region Resources
public Camera main_camera; [Header("场景里的对象引用")] public Camera main_camera;
public facer face;
public Light light; public Light light;
public AudioSource audio; public AudioSource audio;
public GameObject ui_back_ground_2d;
public Camera camera_back_ground_2d;
public GameObject ui_windows_2d;
public Camera camera_windows_2d;
public GameObject ui_main_2d;
public Camera camera_main_2d;
public GameObject ui_container_3d;
public Camera camera_container_3d;
public GameObject ui_main_3d;
public Camera camera_main_3d;
[Header("Prefab")] public facer face;
public AudioClip zhankai; public AudioClip zhankai;
public GameObject mod_ui_2d;
public GameObject mod_ui_3d;
public GameObject mod_winExplode; public GameObject mod_winExplode;
public GameObject mod_loseExplode; public GameObject mod_loseExplode;
public GameObject mod_audio_effect; public GameObject mod_audio_effect;
...@@ -257,17 +268,6 @@ public class Program : MonoBehaviour ...@@ -257,17 +268,6 @@ public class Program : MonoBehaviour
return transparency; return transparency;
} }
public static GameObject ui_back_ground_2d;
public static Camera camera_back_ground_2d;
public static GameObject ui_container_3d;
public static Camera camera_container_3d;
public static Camera camera_game_main;
public static GameObject ui_windows_2d;
public static Camera camera_windows_2d;
public static GameObject ui_main_2d;
public static Camera camera_main_2d;
public static GameObject ui_main_3d;
public static Camera camera_main_3d;
public static Vector3 cameraPosition = new Vector3(0, 23, -23); public static Vector3 cameraPosition = new Vector3(0, 23, -23);
public static Vector3 cameraRotation = new Vector3(60, 0, 0); public static Vector3 cameraRotation = new Vector3(60, 0, 0);
...@@ -549,102 +549,6 @@ public class Program : MonoBehaviour ...@@ -549,102 +549,6 @@ public class Program : MonoBehaviour
if (i == 15) continue; if (i == 15) continue;
rayFilter |= (int) Math.Pow(2, i); rayFilter |= (int) Math.Pow(2, i);
} }
if (camera_game_main == null) camera_game_main = main_camera;
camera_game_main.transform.position = new Vector3(0, 23, -23);
camera_game_main.transform.eulerAngles = new Vector3(60, 0, 0);
camera_game_main.transform.localScale = new Vector3(1, 1, 1);
camera_game_main.rect = new Rect(0, 0, 1, 1);
camera_game_main.depth = 0;
camera_game_main.gameObject.layer = 0;
camera_game_main.clearFlags = CameraClearFlags.Depth;
if (ui_back_ground_2d == null)
{
ui_back_ground_2d = create(mod_ui_2d);
camera_back_ground_2d = ui_back_ground_2d.transform.Find("Camera").GetComponent<Camera>();
}
camera_back_ground_2d.depth = -2;
ui_back_ground_2d.layer = 8;
ui_back_ground_2d.transform.Find("Camera").gameObject.layer = 8;
camera_back_ground_2d.cullingMask = (int) Mathf.Pow(2, 8);
camera_back_ground_2d.clearFlags = CameraClearFlags.Depth;
if (ui_container_3d == null)
{
ui_container_3d = create(mod_ui_3d);
camera_container_3d = ui_container_3d.transform.Find("Camera").GetComponent<Camera>();
}
camera_container_3d.depth = -1;
ui_container_3d.layer = 9;
ui_container_3d.transform.Find("Camera").gameObject.layer = 9;
camera_container_3d.cullingMask = (int) Mathf.Pow(2, 9);
camera_container_3d.fieldOfView = 75;
camera_container_3d.rect = camera_game_main.rect;
camera_container_3d.transform.position = new Vector3(0, 23, -23);
camera_container_3d.transform.eulerAngles = new Vector3(60, 0, 0);
camera_container_3d.transform.localScale = new Vector3(1, 1, 1);
camera_container_3d.rect = new Rect(0, 0, 1, 1);
camera_container_3d.clearFlags = CameraClearFlags.Depth;
if (ui_main_2d == null)
{
ui_main_2d = create(mod_ui_2d);
camera_main_2d = ui_main_2d.transform.Find("Camera").GetComponent<Camera>();
}
camera_main_2d.depth = 3;
ui_main_2d.layer = 11;
ui_main_2d.transform.Find("Camera").gameObject.layer = 11;
camera_main_2d.cullingMask = (int) Mathf.Pow(2, 11);
camera_main_2d.clearFlags = CameraClearFlags.Depth;
if (ui_windows_2d == null)
{
ui_windows_2d = create(mod_ui_2d);
camera_windows_2d = ui_windows_2d.transform.Find("Camera").GetComponent<Camera>();
}
camera_windows_2d.depth = 2;
ui_windows_2d.layer = 19;
ui_windows_2d.transform.Find("Camera").gameObject.layer = 19;
camera_windows_2d.cullingMask = (int) Mathf.Pow(2, 19);
camera_windows_2d.clearFlags = CameraClearFlags.Depth;
if (ui_main_3d == null)
{
ui_main_3d = create(mod_ui_3d);
camera_main_3d = ui_main_3d.transform.Find("Camera").GetComponent<Camera>();
}
camera_main_3d.depth = 1;
ui_main_3d.layer = 10;
ui_main_3d.transform.Find("Camera").gameObject.layer = 10;
camera_main_3d.cullingMask = (int) Mathf.Pow(2, 10);
camera_main_3d.fieldOfView = 75;
camera_main_3d.rect = new Rect(0, 0, 1, 1);
camera_main_3d.transform.position = new Vector3(0, 23, -23);
camera_main_3d.transform.eulerAngles = new Vector3(60, 0, 0);
camera_main_3d.transform.localScale = new Vector3(1, 1, 1);
camera_main_3d.clearFlags = CameraClearFlags.Depth;
camera_main_3d.transform.localPosition = camera_game_main.transform.position;
camera_container_3d.transform.localPosition = camera_game_main.transform.position;
camera_main_3d.transform.localEulerAngles = camera_game_main.transform.localEulerAngles;
camera_container_3d.transform.localEulerAngles = camera_game_main.transform.localEulerAngles;
camera_main_3d.fieldOfView = camera_game_main.fieldOfView;
camera_container_3d.fieldOfView = camera_game_main.fieldOfView;
camera_main_3d.rect = camera_game_main.rect;
camera_container_3d.rect = camera_game_main.rect;
} }
public static float deltaTime = 1f / 120f; public static float deltaTime = 1f / 120f;
...@@ -653,25 +557,26 @@ public class Program : MonoBehaviour ...@@ -653,25 +557,26 @@ public class Program : MonoBehaviour
{ {
deltaTime = Time.deltaTime; deltaTime = Time.deltaTime;
if (deltaTime > 1f / 40f) deltaTime = 1f / 40f; if (deltaTime > 1f / 40f) deltaTime = 1f / 40f;
if (camera_game_main != null) if (main_camera != null)
{ {
camera_game_main.transform.position += main_camera.transform.position +=
(cameraPosition - camera_game_main.transform.position) * deltaTime * 3.5f; (cameraPosition - main_camera.transform.position) * deltaTime * 3.5f;
camera_container_3d.transform.localPosition = camera_game_main.transform.position; camera_container_3d.transform.localPosition = main_camera.transform.position;
if (cameraFacing == false) if (cameraFacing == false)
camera_game_main.transform.localEulerAngles += main_camera.transform.localEulerAngles +=
(cameraRotation - camera_game_main.transform.localEulerAngles) * deltaTime * 3.5f; (cameraRotation - main_camera.transform.localEulerAngles) * deltaTime * 3.5f;
else else
camera_game_main.transform.LookAt(Vector3.zero); main_camera.transform.LookAt(Vector3.zero);
camera_container_3d.transform.localEulerAngles = camera_game_main.transform.localEulerAngles; camera_container_3d.transform.localEulerAngles = main_camera.transform.localEulerAngles;
camera_container_3d.fieldOfView = camera_game_main.fieldOfView; camera_container_3d.fieldOfView = main_camera.fieldOfView;
camera_container_3d.rect = camera_game_main.rect; camera_container_3d.rect = main_camera.rect;
} }
} }
public void fixScreenProblems() public void fixScreenProblems()
{ {
for (var i = 0; i < servants.Count; i++) servants[i].fixScreenProblem(); foreach (var t in servants)
t.fixScreenProblem();
} }
public GameObject create( public GameObject create(
...@@ -774,9 +679,9 @@ public class Program : MonoBehaviour ...@@ -774,9 +679,9 @@ public class Program : MonoBehaviour
var all = Screen.width / 2f; var all = Screen.width / 2f;
var it = xINscreen - Screen.width / 2f; var it = xINscreen - Screen.width / 2f;
var val = it / all; var val = it / all;
camera_game_main.rect = new Rect(val, 0, 1, 1); I().main_camera.rect = new Rect(val, 0, 1, 1);
camera_container_3d.rect = camera_game_main.rect; I().camera_container_3d.rect = I().main_camera.rect;
camera_main_3d.rect = camera_game_main.rect; I().camera_main_3d.rect = I().main_camera.rect;
} }
public static void ShiftUIenabled(GameObject ui, bool enabled) public static void ShiftUIenabled(GameObject ui, bool enabled)
......
...@@ -381,7 +381,7 @@ public class Room : WindowServantSP ...@@ -381,7 +381,7 @@ public class Room : WindowServantSP
int opResult = r.ReadByte(); int opResult = r.ReadByte();
Program.I().new_ui_handShower.GetComponent<handShower>().me = meResult - 1; Program.I().new_ui_handShower.GetComponent<handShower>().me = meResult - 1;
Program.I().new_ui_handShower.GetComponent<handShower>().op = opResult - 1; Program.I().new_ui_handShower.GetComponent<handShower>().op = opResult - 1;
handres = create(Program.I().new_ui_handShower, Vector3.zero, Vector3.zero, false, Program.ui_main_2d); handres = create(Program.I().new_ui_handShower, Vector3.zero, Vector3.zero, false, Program.I().ui_main_2d);
destroy(handres, 10f); destroy(handres, 10f);
animationTime = 1300; animationTime = 1300;
} }
...@@ -560,7 +560,7 @@ public class Room : WindowServantSP ...@@ -560,7 +560,7 @@ public class Room : WindowServantSP
if (Program.I().ocgcore.isShowed == false) if (Program.I().ocgcore.isShowed == false)
{ {
Program.camera_game_main.transform.position = new Vector3(0, 230, -230); Program.I().main_camera.transform.position = new Vector3(0, 230, -230);
if (mode != 2) if (mode != 2)
{ {
if (selftype == 1) if (selftype == 1)
......
...@@ -118,7 +118,7 @@ public class Servant ...@@ -118,7 +118,7 @@ public class Servant
if (toolBar != null) if (toolBar != null)
{ {
var vectorOfShowedBar_Screen = new Vector3(Screen.width - RightToScreen, buttomToScreen, 0); var vectorOfShowedBar_Screen = new Vector3(Screen.width - RightToScreen, buttomToScreen, 0);
iTween.MoveTo(toolBar, Program.camera_back_ground_2d.ScreenToWorldPoint(vectorOfShowedBar_Screen), 0.6f); iTween.MoveTo(toolBar, Program.I().camera_back_ground_2d.ScreenToWorldPoint(vectorOfShowedBar_Screen), 0.6f);
toolBar.transform.localScale = toolBar.transform.localScale =
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f); new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f);
var items = toolBar.GetComponentsInChildren<toolShift>(); var items = toolBar.GetComponentsInChildren<toolShift>();
...@@ -131,7 +131,7 @@ public class Servant ...@@ -131,7 +131,7 @@ public class Servant
if (toolBar != null) if (toolBar != null)
{ {
var vectorOfHidedBar_Screen = new Vector3(Screen.width - RightToScreen, -100, 0); var vectorOfHidedBar_Screen = new Vector3(Screen.width - RightToScreen, -100, 0);
iTween.MoveTo(toolBar, Program.camera_back_ground_2d.ScreenToWorldPoint(vectorOfHidedBar_Screen), 0.6f); iTween.MoveTo(toolBar, Program.I().camera_back_ground_2d.ScreenToWorldPoint(vectorOfHidedBar_Screen), 0.6f);
toolBar.transform.localScale = toolBar.transform.localScale =
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f); new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f);
var items = toolBar.GetComponentsInChildren<toolShift>(); var items = toolBar.GetComponentsInChildren<toolShift>();
...@@ -255,10 +255,10 @@ public class Servant ...@@ -255,10 +255,10 @@ public class Servant
toolBar = create toolBar = create
( (
mod, mod,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - RightToScreen, -100, 0)), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - RightToScreen, -100, 0)),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
false, false,
Program.ui_main_2d Program.I().ui_main_2d
); );
UIHelper.InterGameObject(toolBar); UIHelper.InterGameObject(toolBar);
fixScreenProblem(); fixScreenProblem();
...@@ -287,7 +287,7 @@ public class Servant ...@@ -287,7 +287,7 @@ public class Servant
{ {
if (Program.I().ocgcore.isShowed || Program.I().deckManager.isShowed) if (Program.I().ocgcore.isShowed || Program.I().deckManager.isShowed)
{ {
var screenP = Program.camera_game_main.WorldToScreenPoint(Vector3.zero); var screenP = Program.I().main_camera.WorldToScreenPoint(Vector3.zero);
screenP.z = 0; screenP.z = 0;
if (fix) if (fix)
{ {
...@@ -295,10 +295,10 @@ public class Servant ...@@ -295,10 +295,10 @@ public class Servant
if (screenP.y < 350f) screenP.y = 350f; if (screenP.y < 350f) screenP.y = 350f;
} }
return Program.camera_main_2d.ScreenToWorldPoint(screenP); return Program.I().camera_main_2d.ScreenToWorldPoint(screenP);
} }
return Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 0)); return Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 0));
} }
private Vector3 MSentre() private Vector3 MSentre()
...@@ -306,19 +306,19 @@ public class Servant ...@@ -306,19 +306,19 @@ public class Servant
if (Program.I().ocgcore.isShowed) if (Program.I().ocgcore.isShowed)
{ {
var real = (Program.fieldSize - 1) * 0.9f + 1f; var real = (Program.fieldSize - 1) * 0.9f + 1f;
var screenP = Program.camera_game_main.WorldToScreenPoint(new Vector3(0, 0, -5.65f * real)); var screenP = Program.I().main_camera.WorldToScreenPoint(new Vector3(0, 0, -5.65f * real));
screenP.z = 0; screenP.z = 0;
return Program.camera_main_2d.ScreenToWorldPoint(screenP); return Program.I().camera_main_2d.ScreenToWorldPoint(screenP);
} }
if (Program.I().deckManager.isShowed) if (Program.I().deckManager.isShowed)
{ {
var screenP = Program.camera_game_main.WorldToScreenPoint(Vector3.zero); var screenP = Program.I().main_camera.WorldToScreenPoint(Vector3.zero);
screenP.z = 0; screenP.z = 0;
return Program.camera_main_2d.ScreenToWorldPoint(screenP); return Program.I().camera_main_2d.ScreenToWorldPoint(screenP);
} }
return Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 0)); return Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 0));
} }
private enum messageSystemType private enum messageSystemType
...@@ -438,7 +438,7 @@ public class Servant ...@@ -438,7 +438,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -458,7 +458,7 @@ public class Servant ...@@ -458,7 +458,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -479,7 +479,7 @@ public class Servant ...@@ -479,7 +479,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -510,7 +510,7 @@ public class Servant ...@@ -510,7 +510,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -531,7 +531,7 @@ public class Servant ...@@ -531,7 +531,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -553,7 +553,7 @@ public class Servant ...@@ -553,7 +553,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -594,7 +594,7 @@ public class Servant ...@@ -594,7 +594,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -633,7 +633,7 @@ public class Servant ...@@ -633,7 +633,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -674,7 +674,7 @@ public class Servant ...@@ -674,7 +674,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -695,7 +695,7 @@ public class Servant ...@@ -695,7 +695,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
...@@ -722,7 +722,7 @@ public class Servant ...@@ -722,7 +722,7 @@ public class Servant
MSentre(), MSentre(),
Vector3.zero, Vector3.zero,
true, true,
Program.ui_main_2d, Program.I().ui_main_2d,
true, true,
new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f) new Vector3(Screen.height / 700f, Screen.height / 700f, Screen.height / 700f)
); );
......
...@@ -8,7 +8,7 @@ public class WindowServant2D : Servant ...@@ -8,7 +8,7 @@ public class WindowServant2D : Servant
{ {
UIHelper.clearITWeen(gameObject); UIHelper.clearITWeen(gameObject);
iTween.MoveTo(gameObject, iTween.MoveTo(gameObject,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 0)), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 0)),
0.6f); 0.6f);
} }
} }
...@@ -19,20 +19,20 @@ public class WindowServant2D : Servant ...@@ -19,20 +19,20 @@ public class WindowServant2D : Servant
{ {
UIHelper.clearITWeen(gameObject); UIHelper.clearITWeen(gameObject);
iTween.MoveTo(gameObject, iTween.MoveTo(gameObject,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 0)), 0.6f); Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 0)), 0.6f);
} }
} }
public override void hide() public override void hide()
{ {
base.hide(); base.hide();
Program.ShiftUIenabled(Program.ui_main_3d, true); Program.ShiftUIenabled(Program.I().ui_main_3d, true);
} }
public override void show() public override void show()
{ {
base.show(); base.show();
Program.ShiftUIenabled(Program.ui_main_3d, false); Program.ShiftUIenabled(Program.I().ui_main_3d, false);
} }
public static GameObject createWindow(Servant servant, GameObject mod) public static GameObject createWindow(Servant servant, GameObject mod)
...@@ -40,10 +40,10 @@ public class WindowServant2D : Servant ...@@ -40,10 +40,10 @@ public class WindowServant2D : Servant
var re = servant.create var re = servant.create
( (
mod, mod,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 600)), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 600)),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
false, false,
Program.ui_main_2d Program.I().ui_main_2d
); );
UIHelper.InterGameObject(re); UIHelper.InterGameObject(re);
return re; return re;
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
// public override void hide() // public override void hide()
// { // {
// base.hide(); // base.hide();
// Program.shiftCameraPan(Program.camera_main_3d, false); // Program.shiftCameraPan(Program.I().camera_main_3d, false);
// } // }
// public override void show() // public override void show()
// { // {
// base.show(); // base.show();
// Program.shiftCameraPan(Program.camera_main_3d, true); // Program.shiftCameraPan(Program.I().camera_main_3d, true);
// } // }
// public override void applyHideArrangement() // public override void applyHideArrangement()
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
// private void killani() // private void killani()
// { // {
// gameObject.transform.localPosition = Program.camera_main_3d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 1000)); // gameObject.transform.localPosition = Program.I().camera_main_3d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 1000));
// } // }
// public override void applyShowArrangement() // public override void applyShowArrangement()
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
// } // }
// panelKIller.set(true); // panelKIller.set(true);
// Program.notGo(killani); // Program.notGo(killani);
// gameObject.transform.localPosition = Program.camera_main_3d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 500)); // gameObject.transform.localPosition = Program.I().camera_main_3d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height / 2, 500));
// } // }
// } // }
...@@ -57,10 +57,10 @@ ...@@ -57,10 +57,10 @@
// GameObject re = servant.create // GameObject re = servant.create
// ( // (
// mod, // mod,
// Program.camera_main_3d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 600)), // Program.I().camera_main_3d.ScreenToWorldPoint(new Vector3(Screen.width / 2, Screen.height * 1.5f, 600)),
// new Vector3(60, 0, 0), // new Vector3(60, 0, 0),
// false, // false,
// Program.ui_main_3d // Program.I().ui_main_3d
// ); // );
// UIHelper.InterGameObject(re); // UIHelper.InterGameObject(re);
// return re; // return re;
......
...@@ -86,7 +86,7 @@ public class WindowServantSP : Servant ...@@ -86,7 +86,7 @@ public class WindowServantSP : Servant
Vector3.zero, Vector3.zero,
Vector3.zero, Vector3.zero,
false, false,
Program.ui_windows_2d Program.I().ui_windows_2d
); );
UIHelper.InterGameObject(gameObject); UIHelper.InterGameObject(gameObject);
var v = new Vector3(); var v = new Vector3();
......
...@@ -42,11 +42,11 @@ public class DeckManager : ServantWithCardDescription ...@@ -42,11 +42,11 @@ public class DeckManager : ServantWithCardDescription
public override void show() public override void show()
{ {
base.show(); base.show();
Program.camera_game_main.transform.position = new Vector3(0, 35, 0); Program.I().main_camera.transform.position = new Vector3(0, 35, 0);
Program.camera_game_main.transform.localEulerAngles = new Vector3(90, 0, 0); Program.I().main_camera.transform.localEulerAngles = new Vector3(90, 0, 0);
cameraAngle = 90; cameraAngle = 90;
Program.cameraFacing = true; Program.cameraFacing = true;
Program.cameraPosition = Program.camera_game_main.transform.position; Program.cameraPosition = Program.I().main_camera.transform.position;
camrem(); camrem();
Program.I().light.transform.eulerAngles = new Vector3(50, 0, 0); Program.I().light.transform.eulerAngles = new Vector3(50, 0, 0);
gameObjectDesk = create_s(Program.I().new_mod_tableInDeckManager); gameObjectDesk = create_s(Program.I().new_mod_tableInDeckManager);
...@@ -747,18 +747,18 @@ public class DeckManager : ServantWithCardDescription ...@@ -747,18 +747,18 @@ public class DeckManager : ServantWithCardDescription
gameObjectSearch = create gameObjectSearch = create
( (
Program.I().new_ui_search, Program.I().new_ui_search,
Program.camera_back_ground_2d.ScreenToWorldPoint(new Vector3(Screen.width + 600, Screen.height / 2, 600)), Program.I().camera_back_ground_2d.ScreenToWorldPoint(new Vector3(Screen.width + 600, Screen.height / 2, 600)),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
false, false,
Program.ui_back_ground_2d Program.I().ui_back_ground_2d
); );
gameObjectDetailedSearch = create gameObjectDetailedSearch = create
( (
Program.I().new_ui_searchDetailed, Program.I().new_ui_searchDetailed,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height * 2f, 0)), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width, Screen.height * 2f, 0)),
new Vector3(0, 0, 0), new Vector3(0, 0, 0),
false, false,
Program.ui_main_2d Program.I().ui_main_2d
); );
UIHelper.InterGameObject(gameObjectSearch); UIHelper.InterGameObject(gameObjectSearch);
UIHelper.InterGameObject(gameObjectDetailedSearch); UIHelper.InterGameObject(gameObjectDetailedSearch);
...@@ -822,7 +822,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -822,7 +822,7 @@ public class DeckManager : ServantWithCardDescription
{ {
GameObject returnValue = null; GameObject returnValue = null;
returnValue = create(Program.I().new_ui_cardOnSearchList, Vector3.zero, Vector3.zero, false, returnValue = create(Program.I().new_ui_cardOnSearchList, Vector3.zero, Vector3.zero, false,
Program.ui_back_ground_2d); Program.I().ui_back_ground_2d);
UIHelper.getRealEventGameObject(returnValue).name = Args[0]; UIHelper.getRealEventGameObject(returnValue).name = Args[0];
UIHelper.trySetLableText(returnValue, Args[2]); UIHelper.trySetLableText(returnValue, Args[2]);
var cardPicLoader_ = UIHelper.getRealEventGameObject(returnValue).AddComponent<cardPicLoader>(); var cardPicLoader_ = UIHelper.getRealEventGameObject(returnValue).AddComponent<cardPicLoader>();
...@@ -839,7 +839,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -839,7 +839,7 @@ public class DeckManager : ServantWithCardDescription
base.applyHideArrangement(); base.applyHideArrangement();
Program.cameraFacing = false; Program.cameraFacing = false;
iTween.MoveTo(gameObjectSearch, iTween.MoveTo(gameObjectSearch,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width + 600, Screen.height / 2, 600)), 1.2f); Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width + 600, Screen.height / 2, 600)), 1.2f);
refreshDetail(); refreshDetail();
} }
...@@ -850,7 +850,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -850,7 +850,7 @@ public class DeckManager : ServantWithCardDescription
var tex = UIHelper.getByName<UITexture>(gameObjectSearch, "under_"); var tex = UIHelper.getByName<UITexture>(gameObjectSearch, "under_");
tex.height = Screen.height; tex.height = Screen.height;
iTween.MoveTo(gameObjectSearch, iTween.MoveTo(gameObjectSearch,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - tex.width / 2, Screen.height / 2, 0)), Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - tex.width / 2, Screen.height / 2, 0)),
1.2f); 1.2f);
refreshDetail(); refreshDetail();
} }
...@@ -866,7 +866,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -866,7 +866,7 @@ public class DeckManager : ServantWithCardDescription
switch (condition) switch (condition)
{ {
case Condition.editDeck: case Condition.editDeck:
UIHelper.setParent(gameObjectSearch, Program.ui_back_ground_2d); UIHelper.setParent(gameObjectSearch, Program.I().ui_back_ground_2d);
SetBar(Program.I().new_bar_editDeck, 0, 230); SetBar(Program.I().new_bar_editDeck, 0, 230);
UIPopupList_banlist = UIHelper.getByName<UIPopupList>(toolBar, "lfList_"); UIPopupList_banlist = UIHelper.getByName<UIPopupList>(toolBar, "lfList_");
var banlistNames = BanlistManager.getAllName(); var banlistNames = BanlistManager.getAllName();
...@@ -882,7 +882,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -882,7 +882,7 @@ public class DeckManager : ServantWithCardDescription
UIHelper.registEvent(toolBar, "copy_", onCopy); UIHelper.registEvent(toolBar, "copy_", onCopy);
break; break;
case Condition.changeSide: case Condition.changeSide:
UIHelper.setParent(gameObjectSearch, Program.ui_main_2d); UIHelper.setParent(gameObjectSearch, Program.I().ui_main_2d);
SetBar(Program.I().new_bar_changeSide, 0, 230); SetBar(Program.I().new_bar_changeSide, 0, 230);
UIPopupList_banlist = null; UIPopupList_banlist = null;
UIHelper.registEvent(toolBar, "rand_", rand); UIHelper.registEvent(toolBar, "rand_", rand);
...@@ -1069,7 +1069,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1069,7 +1069,7 @@ public class DeckManager : ServantWithCardDescription
{ {
gameObjectDetailedSearch.GetComponent<UITexture>().height = 700; gameObjectDetailedSearch.GetComponent<UITexture>().height = 700;
iTween.MoveTo(gameObjectDetailedSearch, iTween.MoveTo(gameObjectDetailedSearch,
Program.camera_main_2d.ScreenToWorldPoint( Program.I().camera_main_2d.ScreenToWorldPoint(
new Vector3(Screen.width - 230 - 115f * Screen.height / 700f, Screen.height * 0.5f, 0)), new Vector3(Screen.width - 230 - 115f * Screen.height / 700f, Screen.height * 0.5f, 0)),
0.6f); 0.6f);
reShowBar(0, 230 + 230 * Screen.height / 700f); reShowBar(0, 230 + 230 * Screen.height / 700f);
...@@ -1078,7 +1078,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1078,7 +1078,7 @@ public class DeckManager : ServantWithCardDescription
{ {
gameObjectDetailedSearch.GetComponent<UITexture>().height = 700; gameObjectDetailedSearch.GetComponent<UITexture>().height = 700;
iTween.MoveTo(gameObjectDetailedSearch, iTween.MoveTo(gameObjectDetailedSearch,
Program.camera_main_2d.ScreenToWorldPoint( Program.I().camera_main_2d.ScreenToWorldPoint(
new Vector3(Screen.width - 230 - 115f * Screen.height / 700f, Screen.height * 1.5f, 0)), new Vector3(Screen.width - 230 - 115f * Screen.height / 700f, Screen.height * 1.5f, 0)),
0.6f); 0.6f);
reShowBar(0, 230); reShowBar(0, 230);
...@@ -1091,7 +1091,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1091,7 +1091,7 @@ public class DeckManager : ServantWithCardDescription
{ {
gameObjectDetailedSearch.GetComponent<UITexture>().height = Screen.height; gameObjectDetailedSearch.GetComponent<UITexture>().height = Screen.height;
iTween.MoveTo(gameObjectDetailedSearch, iTween.MoveTo(gameObjectDetailedSearch,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - 345f, Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - 345f,
Screen.height * 0.5f, 0)), 0.6f); Screen.height * 0.5f, 0)), 0.6f);
reShowBar(0, 460); reShowBar(0, 460);
} }
...@@ -1099,7 +1099,7 @@ public class DeckManager : ServantWithCardDescription ...@@ -1099,7 +1099,7 @@ public class DeckManager : ServantWithCardDescription
{ {
gameObjectDetailedSearch.GetComponent<UITexture>().height = Screen.height; gameObjectDetailedSearch.GetComponent<UITexture>().height = Screen.height;
iTween.MoveTo(gameObjectDetailedSearch, iTween.MoveTo(gameObjectDetailedSearch,
Program.camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - 345f, Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(Screen.width - 345f,
Screen.height * 1.5f, 0)), 0.6f); Screen.height * 1.5f, 0)), 0.6f);
reShowBar(0, 230); reShowBar(0, 230);
} }
......
This diff is collapsed.
...@@ -16,7 +16,7 @@ public class screenFader : MonoBehaviour ...@@ -16,7 +16,7 @@ public class screenFader : MonoBehaviour
void Update() void Update()
{ {
screen_point = Program.camera_game_main.WorldToScreenPoint(Vector3.zero); screen_point = Program.I().main_camera.WorldToScreenPoint(Vector3.zero);
screen_point.z = 8f; screen_point.z = 8f;
int bun = Screen.height / 3; int bun = Screen.height / 3;
if (screen_point.y > Screen.height / 2 + bun) if (screen_point.y > Screen.height / 2 + bun)
...@@ -27,7 +27,7 @@ public class screenFader : MonoBehaviour ...@@ -27,7 +27,7 @@ public class screenFader : MonoBehaviour
{ {
screen_point.y = Screen.height / 2 - bun; screen_point.y = Screen.height / 2 - bun;
} }
Vector3 to = Program.camera_game_main.ScreenToWorldPoint(screen_point); Vector3 to = Program.I().main_camera.ScreenToWorldPoint(screen_point);
......
This diff is collapsed.
...@@ -16,10 +16,10 @@ TagManager: ...@@ -16,10 +16,10 @@ TagManager:
- UI - UI
- -
- -
- layer_8 - ui_back_ground_2d
- layer_9 - ui_container_3d
- layer_10 - ui_main_3d
- layer_11 - ui_main_2d
- layer_12 - layer_12
- layer_13 - layer_13
- layer_14 - layer_14
...@@ -27,7 +27,7 @@ TagManager: ...@@ -27,7 +27,7 @@ TagManager:
- card_data_manager - card_data_manager
- mouse - mouse
- debug - debug
- windows - ui_windows_2d
- -
- -
- -
......
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