public Vector2 pointStart; // 物品列表顶点 // Use this for initialization void Start() { Player = GameObject.Find("NewHero"); dc = Player.GetComponent <DeathControl>(); rpu = Player.GetComponent <ResPutUp>(); screenX = Screen.width; screenY = Screen.height; scaleX = screenX / 1280; scaleY = screenY / 720; guiRectStyle = new GUIStyle(); //guiRectStyle.border = new RectOffset(0, 0, 0, 0); guiRectStyle.alignment = TextAnchor.MiddleCenter; //textstyle1 guiTextRectStyle1 = new GUIStyle(); guiTextRectStyle1.fontSize = (int)(32 * scaleX); guiTextRectStyle1.fontStyle = FontStyle.Bold; guiTextRectStyle1.normal.textColor = Color.white; //textstyle2 guiTextRectStyle2 = new GUIStyle(); guiTextRectStyle2.fontSize = (int)(36 * scaleX); guiTextRectStyle2.fontStyle = FontStyle.Bold; guiTextRectStyle2.normal.textColor = Color.white; guiTextRectStyle2.alignment = TextAnchor.MiddleRight; ResPart = GameObject.Find("NewHero").GetComponent <ResPutUp>(); pointStart = new Vector2(1100 * scaleX, 20 * scaleY); }
Vector2 pointStart; // 物品列表顶点 // Use this for initialization void Start() { screenX = Screen.width; screenY = Screen.height; scaleX = screenX / 1280; scaleY = screenY / 720; guiRectStyle = new GUIStyle(); guiRectStyle.border = new RectOffset(0, 0, 0, 0); guiRectStyle.alignment = TextAnchor.MiddleCenter; //textstyle1 guiTextRectStyle1 = new GUIStyle(); guiTextRectStyle1.fontSize = 36; guiTextRectStyle1.fontStyle = FontStyle.Bold; guiTextRectStyle1.normal.textColor = Color.white; //textstyle2 guiTextRectStyle2 = new GUIStyle(); guiTextRectStyle2.fontSize = 30; guiTextRectStyle2.fontStyle = FontStyle.Bold; guiTextRectStyle2.normal.textColor = Color.white; guiTextRectStyle2.alignment = TextAnchor.MiddleRight; ResPart = GameObject.Find("NewHero").GetComponent <ResPutUp>(); pointStart = new Vector2(1000, 20); }
// Use this for initialization void Start() { came = GameObject.Find("Main Camera"); player = GameObject.Find("NewHero"); rpu = player.GetComponent <ResPutUp>(); WholeMap = GameObject.Find("BackGround"); tkm = GameObject.Find("duihuakuang"); tm = GameObject.Find("TextMind"); scenedoor = GameObject.Find("SceneDoor"); tkms = tkm.GetComponent <Image>(); tmt = tm.GetComponent <Text>(); cmwp = came.GetComponent <CameraMoveWithPlayer>(); pc = player.GetComponent <PlayerControl>(); //duihuakuangmaterial = tkm.GetComponent<SpriteRenderer>().material; //GetComponent<SpriteRenderer>().color = new Color(256, 256, 256, 0);//检测体本身透明 }