// Update is called once per frame void Update() { if (Star.activeInHierarchy) { Star.transform.position += new Vector3(0, Time.deltaTime, 0); } if (Star.transform.localPosition.y > 15f) { Star.GetComponent <Image>().color -= new Color32(0, 0, 0, (byte)(300 * Time.deltaTime)); } if (Star.transform.localPosition.y > 20f) { Star.SetActive(false); } if (GameObject.Find("ShopManager")) { Shop_ = GameObject.Find("ShopCanvas").GetComponent <ShopUIManager>(); } if (isCollide || Shop_.isActiveUI) { GetComponent <Animator>().Play("Idle"); } if (guestType == GuestType.Normal) { if (!isCollide && GameObject.Find("ShopManager") && !Shop_.isActiveUI && CloseShop == false) { transform.position += Dir * Time.deltaTime; GetComponent <Animator>().Play("walk"); } else if (!isCollide && GameObject.Find("ShopManager") && !Shop_.isActiveUI && CloseShop == true) { GetComponent <Animator>().Play("walk"); Dir = new Vector3(-speed, 0, 0); transform.position += Dir * Time.deltaTime * 2; transform.FindChild("Text").transform.localScale = new Vector3(-0.06f, 0.06f, 0); transform.localScale = new Vector3(-1, 1, 1); } } else if (guestType == GuestType.HaveQuest) { StarBt.SetActive(false); if (!isCollide && GameObject.Find("ShopManager") && !Shop_.isActiveUI && CloseShop == false) { transform.position += Dir * Time.deltaTime; GetComponent <Animator>().Play("walk"); } else if (CloseShop) { transform.position += Dir * Time.deltaTime; GetComponent <Animator>().Play("walk"); } else { GetComponent <Animator>().Play("Idle"); } } }
// Use this for initialization void Start() { ShopImage = transform.FindChild("ShopsImg").gameObject; Shop_ = GameObject.Find("ShopCanvas").GetComponent <ShopUIManager>(); ShopInfoNum = GameData.ShopInfo[ShopIndex]; OnSale = false; isLook = false; SaleItemImg = ShopImage.transform.FindChild("ItemImg").gameObject; SaleItemID = -1; }
void Start() { shopUIManager = this; updateShopItemsStates(); FillShopItemList(); setBJAmiountText(); InitializeUpgradeShopItems(); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } if (shopCanvas != null) { shopCanvas.enabled = false; } }
// Use this for initialization void Start() { BackPos_x = 1.5f; CurrentPos = new Vector3(-1.25f, transform.position.y + 1.6f, -2); ShopNum = -1; if (FloorIndex > 1) { ShopNum = (FloorIndex - 1) * 4 - 1; transform.FindChild("Stair").FindChild("Text").GetComponent <TextMesh>().text = FloorIndex + "F"; FloorWallIndex = FloorIndex - 1; } ShopWallNum = GameData.getShopWallInfo(FloorWallIndex); transform.FindChild("space").GetComponent <SpriteRenderer>().sprite = Resources.LoadAll <Sprite>("Shop/Wall")[ShopWallNum]; Shop_ = GameObject.Find("ShopCanvas").GetComponent <ShopUIManager>(); Buildmark = transform.FindChild("space").FindChild("mark").gameObject; }
void Awake() { //나중에지우십쇼 Guest = Resources.Load <GameObject>("Guest/Guests1"); haveQuestGuest = false; if (GameData.OnGame == false) { GameData.LoadGame(); } StartCoroutine(CreateGuest()); StartCoroutine(saveGame()); willHunt = false; setInventory(); ItemID = -1; EleID = -1; Shop_ = GameObject.Find("ShopCanvas").GetComponent <ShopUIManager>(); CloseShop = false; heart_m = GameObject.Find("DayManager").transform.FindChild("Heart_h").FindChild("heart_m").gameObject; heart_dir = GameObject.Find("DayManager").transform.FindChild("Heart_h").FindChild("heart_dir").gameObject; GameData.setSpaceNum(GameData.getSpaceOpen()); isHunt_E = false; }
private void Awake() { Instance = this; }
private void Start() { shopUIManager = FindObjectOfType <ShopUIManager>(); }
// Start is called before the first frame update void Start() { shopManager = ShopUIManager.instance; }
void Awake() { _uiManager = GameObject.Find("Canvas").GetComponent <ShopUIManager>(); }
// Start is called before the first frame update void Start() { shopManager = ShopUIManager.instance; GetComponent <GetNPCSprite>().enabled = false; }