示例#1
0
    public void Init(GameStateMachine stateMachine)
    {
        Debug.Log("Entering In Intro State");
        DOTween.Init(true, true, LogBehaviour.ErrorsOnly);

        _stateMachine = stateMachine;

        _splashController = new SplashScreenController();
        _splashController.Start();
    }
示例#2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            _window = new UIWindow(UIScreen.MainScreen.Bounds);

            // Add the the splash controller
            _splashScreenController = new SplashScreenController();
            _window.BackgroundColor = UIColor.FromRGBA(0x36, 0x36, 0x36, 1);
            _window.Add(_splashScreenController.View);
            _window.MakeKeyAndVisible();

            return(true);
        }
示例#3
0
        public IEnumerator ShowSuspendQuestSplashscreen(Quest quest)
        {
            AssetRequest <GameObject> splashScreenPrefab = Content.LoadAsync(new PrefabContentKey(splashScreenContentKey, quest.Mascot.Name));

            yield return(splashScreenPrefab);

            GameObject splashScreenObject = UnityEngine.Object.Instantiate(splashScreenPrefab.Asset);

            splashScreen = splashScreenObject.GetComponent <SplashScreenController>();
            splashScreen.SetMessage(Service.Get <Localizer>().GetTokenTranslation(quest.Definition.SplashScreenText));
            dispatcher.DispatchEvent(new PopupEvents.ShowPopup(splashScreenObject, destroyPopupOnBackPressed: false, scaleToFit: true, "Accessibility.Popup.Title.QuestStop"));
            dispatcher.DispatchEvent(new TrayEvents.CloseTray(isControlsVisible: false, isPersistent: false));
            IsSplashScreenOpen = true;
            EventManager.Instance.PostEvent("MIX/MusicWorldOn", EventAction.PlaySound, null);
        }
示例#4
0
    private void SplashScreenFadeIn()
    {
        Debug.Log("SplashScreenFadeIn");

        _splashScreenAudio.volume += 
            _splashScreenFadeSpeed * Time.deltaTime;                    // Increase volume by fade speed
        _splashScreenFadeValue +=
            _splashScreenFadeSpeed * Time.deltaTime;                    // Increase fade value by fade speed

        if (_splashScreenFadeValue > 1)                                 // If fade value is greater than one
            _splashScreenFadeValue = 1;                                 // Then set fade value to 1

        if(_splashScreenFadeValue == 1)                                 // If fade value equals 1 
            _splashScreenController =                                   // Set splash screen controller to equal
                SplashScreenController.SplashScreenFadeOut;             // splash screen fade out
    }
示例#5
0
    // Start is called before the first frame update
    void Start()
    {
        Cursor.visible = false;                                         // Set cursor visible state to false
        Cursor.lockState = CursorLockMode.Locked;                       // and lock the cursor

        _splashScreenAudio = GetComponent<AudioSource>();               // Splash screen audio equals the audio source component
        _splashScreenAudio.volume = 0;                                  // Audio volume = 0 on startup
        _splashScreenAudio.clip = _splashScreenMusic;                   // Audio clip equals splash screen music
        _splashScreenAudio.loop = true;                                 // Set audio to loop
        _splashScreenAudio.Play();                                      // Play audio

        _splashScreenController =                                       // State equals
            SplashScreen.SplashScreenController.SplashScreenFadeIn;     // fade in on startup

        StartCoroutine("SplashScreenManager");                          // Start splash screen manager
    }
示例#6
0
    private void SplashScreenFadeIn()
    {
        Debug.Log("SplashScreenFadeIn");

        _splashScreenAudio.volume += _splashScreenFadeSpeed * Time.deltaTime;                      //increase volume by fadespeed
        _splashScreenFadeValue    += _splashScreenFadeSpeed * Time.deltaTime;                      //increase fade value by fade speed

        if (_splashScreenFadeValue > 1)                                                            //if fade value is greater than 1
        {
            _splashScreenFadeValue = 1;                                                            //then set fade value to 1
        }

        if (_splashScreenFadeValue == 1)                                                          //if fade value = 1
        {
            _splashScreenController = SplashScreen.SplashScreenController.SplashScreenFadeOut;    //set splash screen controller to equal splash screen fade out
        }
    }
示例#7
0
    // Start is called before the first frame update
    void Start()
    {
        Cursor.visible   = false;                                                                   //set cursor visible state to false
        Cursor.lockState = CursorLockMode.Locked;                                                   //to lock the cursor

        _splashScreenAudio = GetComponent <AudioSource>();                                          //splash screen causes the audio source

        _splashScreenAudio.volume = 0;                                                              //Audio volume = 0 on startup
        _splashScreenAudio.clip   = _splashScreenMusic;                                             //Audio clip = splash screen music
        _splashScreenAudio.loop   = true;                                                           //set Audio to loop
        _splashScreenAudio.Play();                                                                  //Play Audio :)

        _splashScreenController = SplashScreen.SplashScreenController.SplashScreenFadeIn;           //state = fade in on start up


        StartCoroutine("SplashScreenManager");                                                     //start splash screen manager function
    }
示例#8
0
        public IEnumerator ShowStartQuestSplashscreen(Quest quest)
        {
            GameObject HUD = GameObject.FindWithTag(UIConstants.Tags.UI_HUD);

            if (HUD != null && HUD.GetComponentInChildren <PopupManager>() != null)
            {
                AssetRequest <GameObject> splashScreenPrefab = Content.LoadAsync(new PrefabContentKey(splashScreenContentKey, quest.Mascot.Name));
                yield return(splashScreenPrefab);

                GameObject splashScreenObject = UnityEngine.Object.Instantiate(splashScreenPrefab.Asset);
                splashScreen = splashScreenObject.GetComponent <SplashScreenController>();
                splashScreen.SetMessage(Service.Get <Localizer>().GetTokenTranslation(quest.Definition.SplashScreenText));
                dispatcher.DispatchEvent(new PopupEvents.ShowPopup(splashScreenObject, destroyPopupOnBackPressed: false, scaleToFit: true, "Accessibility.Popup.Title.QuestStart"));
                dispatcher.DispatchEvent(new TrayEvents.CloseTray(isControlsVisible: false, isPersistent: false));
                dispatcher.DispatchEvent(new HudEvents.PermanentlySuppressQuestNotifier(suppress: false, autoShow: false));
                IsSplashScreenOpen = true;
                EventManager.Instance.PostEvent("MIX/MusicWorldOff", EventAction.PlaySound, null);
                EventManager.Instance.PostEvent(quest.Mascot.Definition.QuestIntroMusic, EventAction.PlaySound, null);
            }
        }
 private static void HideSplashScreen(CreatePlayerResponse _)
 {
     SplashScreenController.HideSplashScreen();
 }
 private void Start()
 {
     ssc = FindObjectOfType <SplashScreenController>();
 }
示例#11
0
 void Awake()
 {
     main = this;
 }