Commit b3960089 authored by 神楽坂玲奈's avatar 神楽坂玲奈

put child of ui_back_ground_2d in scene

parent 3baf10f1
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,9 +3,10 @@
--- !u!1 &197510
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 410492}
- component: {fileID: 11446408}
......@@ -18,9 +19,10 @@ GameObject:
m_IsActive: 1
--- !u!4 &410492
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 197510}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
......@@ -31,9 +33,10 @@ Transform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &11446408
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 197510}
m_Enabled: 1
m_EditorHideFlags: 0
......@@ -59,13 +62,13 @@ MonoBehaviour:
updateAnchors: 1
mColor: {r: 1, g: 1, b: 1, a: 1}
mPivot: 4
mWidth: 2
mHeight: 2
mDepth: 0
mWidth: 1368
mHeight: 770
mDepth: -100
autoResizeBoxCollider: 0
hideIfOffScreen: 0
keepAspectRatio: 0
aspectRatio: 1
aspectRatio: 1.7766234
mType: 0
mFillDirection: 4
mFillAmount: 1
......@@ -88,14 +91,3 @@ MonoBehaviour:
mBorder: {x: 0, y: 0, z: 0, w: 0}
mFixedAspect: 0
mOutPath:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 197510}
m_IsPrefabParent: 1
......@@ -7,8 +7,7 @@ public class BackGroundPic : Servant
public override void initialize()
{
backGround = create(Program.I().mod_simple_ngui_background_texture, Vector3.zero, Vector3.zero, false,
Program.I().ui_back_ground_2d);
backGround = Program.I().mod_simple_ngui_background_texture;
var file = new FileStream("texture/common/desk.jpg", FileMode.Open, FileAccess.Read);
file.Seek(0, SeekOrigin.Begin);
var data = new byte[file.Length];
......@@ -16,7 +15,7 @@ public class BackGroundPic : Servant
file.Close();
file.Dispose();
file = null;
var pic = new Texture2D(1024, 600);
var pic = new Texture2D(1920, 1080);
pic.LoadImage(data);
backGround.GetComponent<UITexture>().mainTexture = pic;
backGround.GetComponent<UITexture>().depth = -100;
......
......@@ -45,18 +45,20 @@ public class CardDescription : Servant
public override void initialize()
{
gameObject = create
(
Program.I().new_ui_cardDescription,
Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(-256, 0, 600)),
new Vector3(0, 0, 0),
true,
Program.I().ui_back_ground_2d
);
picLoader = gameObject.AddComponent<cardPicLoader>();
picLoader.code = 0;
picLoader.uiTexture = UIHelper.getByName<UITexture>(gameObject, "pic_");
picLoader.loaded_code = -1;
gameObject = Program.I().new_ui_cardDescription;
// create
// (
// Program.I().new_ui_cardDescription,
// Program.I().camera_main_2d.ScreenToWorldPoint(new Vector3(-256, 0, 600)),
// new Vector3(0, 0, 0),
// true,
// Program.I().ui_back_ground_2d
// );
// picLoader = gameObject.AddComponent<cardPicLoader>();
// picLoader.code = 0;
// picLoader.uiTexture = UIHelper.getByName<UITexture>(gameObject, "pic_");
// picLoader.loaded_code = -1;
picLoader = gameObject.GetComponent<cardPicLoader>();
resizer = UIHelper.getByName<UIDragResize>(gameObject, "resizer");
underSprite = UIHelper.getByName<UITexture>(gameObject, "under_");
description = UIHelper.getByName<UITextList>(gameObject, "description_");
......
......@@ -474,14 +474,11 @@ public class Ocgcore : ServantWithCardDescription
Arrow.gameObject.SetActive(false);
replayShowAll = Config.Get("replayShowAll", "0") != "0";
reportShowAll = Config.Get("reportShowAll", "0") != "0";
gameInfo = create
(
Program.I().new_ui_gameInfo,
Vector3.zero,
Vector3.zero,
false,
Program.I().ui_back_ground_2d
).GetComponent<gameInfo>();
gameInfo = Program.I().new_ui_gameInfo;
gameInfo.ini();
UIHelper.InterGameObject(gameInfo.gameObject);
shiftCondition(Condition.duel);
......
......@@ -15,22 +15,28 @@ public class Program : MonoBehaviour
#region Resources
[Header("场景里的对象引用")] public Camera main_camera;
[Header("场景")] public Camera main_camera;
public Light light;
public AudioSource audio;
[Header("容器")]
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("ui_back_ground_2d")]
public Camera camera_back_ground_2d;
public GameObject mod_simple_ngui_background_texture;
public GameObject new_ui_cardDescription;
public GameObject new_ui_search;
public gameInfo new_ui_gameInfo;
[Header("Prefab")] public facer face;
public AudioClip zhankai;
public GameObject mod_winExplode;
......@@ -44,7 +50,6 @@ public class Program : MonoBehaviour
public GameObject mod_ocgcore_coin;
public GameObject mod_ocgcore_dice;
public GameObject mod_simple_quad;
public GameObject mod_simple_ngui_background_texture;
public GameObject mod_simple_ngui_text;
public GameObject mod_ocgcore_number;
public GameObject mod_ocgcore_decoration_chain_selecting;
......@@ -103,9 +108,6 @@ public class Program : MonoBehaviour
public GameObject new_ui_setting;
public GameObject new_ui_book;
public GameObject new_ui_selectServer;
public GameObject new_ui_gameInfo;
public GameObject new_ui_cardDescription;
public GameObject new_ui_search;
public GameObject new_ui_searchDetailed;
public GameObject new_ui_cardOnSearchList;
public GameObject new_bar_changeSide;
......@@ -277,17 +279,17 @@ public class Program : MonoBehaviour
private void initialize()
{
go(1, () =>
{
// go(1, () =>
// {
UIHelper.iniFaces();
initializeALLcameras();
fixALLcamerasPreFrame();
backGroundPic = new BackGroundPic();
servants.Add(backGroundPic);
backGroundPic.fixScreenProblem();
});
go(300, () =>
{
// });
// go(300, () =>
// {
InterString.initialize("config/translation.conf");
GameTextureManager.initialize();
Config.initialize("config/config.conf");
......@@ -385,7 +387,7 @@ public class Program : MonoBehaviour
initializeALLservants();
loadResources();
readParams();
});
// });
}
private void readParams()
......@@ -782,7 +784,7 @@ public class Program : MonoBehaviour
#region MonoBehaviors
private void Start()
private void Awake()
{
if (Screen.width < 100 || Screen.height < 100) Screen.SetResolution(1366, 768, false);
QualitySettings.vSyncCount = 0;
......
......@@ -662,15 +662,8 @@ public class DeckManager : ServantWithCardDescription
}
public void setGoodLooking(bool side = false)
{
try
{
Program.I().cardDescription.setData(CardsManager.Get(deck.Main[0]), GameTextureManager.myBack);
}
catch (Exception e)
{
Debug.Log(e);
}
if (side)
{
......@@ -744,14 +737,7 @@ public class DeckManager : ServantWithCardDescription
public override void initialize()
{
gameObjectSearch = create
(
Program.I().new_ui_search,
Program.I().camera_back_ground_2d.ScreenToWorldPoint(new Vector3(Screen.width + 600, Screen.height / 2, 600)),
new Vector3(0, 0, 0),
false,
Program.I().ui_back_ground_2d
);
gameObjectSearch = Program.I().new_ui_search;
gameObjectDetailedSearch = create
(
Program.I().new_ui_searchDetailed,
......
This diff is collapsed.
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