public void ClickSaveSlot()
    {
        hubWorldSFX.PlayHubSoundEffect(HubWorldSFX.HubSoundeffect.ButtonPress);
        if (isNewGame)
        {
            if (chapterName != "")
            {
                // if there is a save, we confirm that user wants to overwrite
                NotificationMenu notificationMenu = parentMenu.GetNotificationMenu();
                notificationMenu.gameObject.SetActive(true);
                notificationMenu.SetupNotification(NotificationMenu.HubNotificationType.NewGameOverwrite, slotNumber);
            }
            else
            {
                // if not, we just create a new game on its own
                PlayerData playerData = FindObjectOfType <PlayerData>();
                playerData.SetupNewGame(slotNumber);
                playerData.SavePlayer();

                FindObjectOfType <HubMenuButton>().OpenMenu();
                parentMenu.gameObject.SetActive(false);
            }
        }
        else
        {
            PlayerData playerData = FindObjectOfType <PlayerData>();
            playerData.LoadPlayer(slotNumber);
            FindObjectOfType <HubMenuButton>().OpenMenu();
            parentMenu.gameObject.SetActive(false);
        }
    }
    public void DeleteSave()
    {
        hubWorldSFX.PlayHubSoundEffect(HubWorldSFX.HubSoundeffect.ButtonPress);
        NotificationMenu notificationMenu = parentMenu.GetNotificationMenu();

        notificationMenu.gameObject.SetActive(true);
        notificationMenu.SetupNotification(NotificationMenu.HubNotificationType.DeletGameConfirm, slotNumber);
    }
예제 #3
0
 internal void UpdateReferences(NotificationBanner notiBanner, NotificationMenu notiMenu, ReturnButton retButton, Image quickNoti, TextMeshProUGUI quicknotitext, AuditionResultNotifications audResNots, MovieResultNotifications movResNot)
 {
     notificationBanner      = notiBanner;
     notificationMenu        = notiMenu;
     returnButton            = retButton;
     quickNotification       = quickNoti;
     quickNotiText           = quicknotitext;
     auditionResults         = audResNots;
     movieResults            = movResNot;
     notificationList        = new List <Notification>();
     onColor                 = quickNotification.color;
     offColor                = new Color(onColor.r, onColor.g, onColor.b, 0);
     quickNotification.color = offColor;
     onTextColor             = quickNotiText.color;
     offTextColor            = new Color(onTextColor.r, onTextColor.g, onTextColor.b, 0);
     quickNotiText.color     = offTextColor;
     quickNotification.transform.DOLocalMoveY(-1000, 0).SetDelay(2);
 }