void OnTriggerEnter2D(Collider2D other) { if (other.name == Constant.Name_Player) { this.gameObject.SetActive(false); BlackBoardHelper.ChangeCrysNumber(m_CrysNumber); } }
void OnTriggerStay2D(Collider2D other) { if (other.name == Constant.Name_Player) { if (ETCInput.GetButton(Constant.Button_Click)) { if (BlackBoardHelper.GetCrysNumber() >= CryCostNumber) { BlackBoardHelper.ChangeCrysNumber(-CryCostNumber); BuildingFlog.SetActive(false); GameManager.Instance.BuildingStates [GameManager.Instance.currentScene * 4 - 4 + BuildingId - 1] = true; GameManager.Instance.BuildingId = BuildingId; DataManager.Instance.SetBuildingStates(GameManager.Instance.BuildingStates); UIManager.Instance.ShowBuildingPanel(); } } } }