Exemplo n.º 1
0
    public void DisplayPurchaseNotification(string id)
    {
        Course course     = courseController.AllCourses[id];
        string courseName = course.CourseName;
        string price      = string.Format("{0:n0}", course.GetTotalPrice());

        ActivedNotificationCanvas(true);
        confirm_purchase_notification.SetActive(true);
        confirm_purchase_notification.transform.GetChild(3).GetComponent <TMP_Text>().text           = courseName;
        confirm_purchase_notification.transform.GetChild(6).GetComponentInChildren <TMP_Text>().text = price;
        _switchScene.DisplayCourseNotification(true);
        UpdateDisplayState(CourseDisplayState.NOTIFICATION);
    }
Exemplo n.º 2
0
 public void Close(GameManager.GameScene gameScene)
 {
     //close menu
     if (gameManager.CurrentGameState == GameManager.GameState.MENU)
     {
         DisplayMenu(ActivedBlur(false), gameScene);
         hasDisplayed = false;
     }
     else if (gameManager.CurrentGameState == GameManager.GameState.HOME_ACTION)
     {
         DisplayHomeAction(ActivedBlur(false), gameScene);
         hasDisplayed = false;
     }
     else if (gameManager.CurrentGameState == GameManager.GameState.COURSE_NOTIFICATION)
     {
         switchScene.DisplayCourseNotification(false);
         hasDisplayed = true;
     }
     else if (gameManager.CurrentGameState == GameManager.GameState.COURSE)
     {
         switchScene.DisplayCourse(false);
         hasDisplayed = false;
     }
     else if (gameManager.CurrentGameState == GameManager.GameState.WORK_PROJECT)
     {
         switchScene.DisplayWorkProject(false);
         hasDisplayed = false;
     }
     else if (gameManager.CurrentGameState == GameManager.GameState.PLACE)
     {
         DisplayPlace(gameScene, false);
         hasDisplayed = false;
     }
     else if (gameManager.CurrentGameState == GameManager.GameState.CALENDAR)
     {
         switchScene.DispleyCalendar(false);
         hasDisplayed = false;
     }
 }