protected override void OnLoad(ContentManager content, GraphicsDevice gd) { /*Map.SetPositionRelativeToScreen(ScreenBound.BottomRight, * new Vector2(- Map.Texture.Width - 10, - Map.Texture.Height - 10));*/ //Resource.SetPositionRelativeToObject(Map, new Vector2(-Resource.Texture.Width - 8, // Map.Texture.Height - 8), false); Life.SetPositionRelativeToScreen(ScreenBound.BottomRight, new Vector2(-Life.Texture.Width - 10, -10)); /*Life.SetPositionRelativeToObject(Map, new Vector2(-Life.Texture.Width - 8, * Map.Texture.Height - 8), false);*/ /*Life.SetPositionRelativeToObject(Resource, new Vector2(-Life.Texture.Width - 8, * 0), false);*/ //ResourceDropShadow.SetPositionRelativeToObject(Resource, new Vector2(0,5), false); LifeDropshadow.SetPositionRelativeToObject(Life, new Vector2(0, 5), false); SpellBackground.SetPositionRelativeToObject(Life, new Vector2(-SpellBackground.Texture.Width - 10, -SpellBackground.Texture.Height + 2), false); UISpellMenu.SetPositionRelativeToObject(SpellBackground, new Vector2(18, 15)); MoneyBackground.SetPositionRelativeToScreen(ScreenBound.BottomLeft, new Vector2(10, -MoneyBackground.Texture.Height - 18)); UIFPSCounter.SetPositionRelativeToObject(MoneyBackground, new Vector2(20, 10)); UIPingCounter.SetPositionRelativeToObject(UIFPSCounter, new Vector2(200, 0)); ScoreBackground.SetPositionRelativeToObject(MoneyBackground, new Vector2(0, -MoneyBackground.Texture.Height + 5)); SetLifeAndResource(); SetScore(); }
private void Awake() { Application.runInBackground = true; // 초기화 currentMode = PlayerPrefs.GetInt("Mode"); Debug.Log("current Game Mode is : " + currentMode); gc = GC.GetComponent <GameController>(); ss = EC.GetComponent <StoryScript>(); bp = EC.GetComponent <ButtonController_Play>(); sr = plate.GetComponent <SpriteRenderer>(); RM = gameObject.GetComponent <RankManager>(); hints = 3; score = 0; combo = 0; movementStatus = 0; solveTime = 45; // 임의 변수초기화 값 // 배경화면 초기화 ClearBackground(); if (currentMode == 0 && currentMode == 1) { RectangleBiscuitBackground.SetActive(true); } else if (currentMode == 2) { Rec2SquareBackground.SetActive(true); } else { SimilarityBackground.SetActive(true); } // TODO : 어느 게임인지 모드 및 난이도를 확인하고 생성까지 여기서 한다. private 변수 활용 if (currentMode == 0) { // challenge mode lifes = 3; isPlay = 2; MakeNewGame(); ResetTimeManager(); StartCoroutine("Timer"); } else { // TODO : story mode lifes = 1; LifeOn[0].SetActive(false); LifeOn[1].SetActive(false); LifeOn[2].SetActive(false); LifeOff[0].SetActive(false); LifeOff[1].SetActive(false); LifeOff[2].SetActive(false); ScoreBackground.SetActive(false); isPlay = 0; } //Debug.Log("EventController Awake"); }
void Awake() { sb = this; clicked = false; //dragged = false; }