Exemple #1
0
        public virtual void OpenMenu(IUserInterface userInterface, MenuArgs args)
        {
            m_userInterface = userInterface;

            if (m_experienceMachine.CurrentExperience == ExperienceType.HOME && m_standaloneMenu != null)
            {
                m_standaloneMenu.SetActive(false);
            }
            m_menuItems.Clear();
            Blocked    = args.Block;
            Persist    = args.Persist;
            m_onAction = args.OnAction;
            gameObject.SetActive(true);

            Populate(args.Items);

            if (m_uiEngine == null)
            {
                m_uiEngine = IOCCore.Resolve <IUIEngine>();
            }

            if (m_okButton != null)
            {
                m_okButton.onClick.AddListener(() => m_uiEngine.CloseLastScreen());
            }
            if (m_closeButton != null)
            {
                m_closeButton.onClick.AddListener(() => m_uiEngine.CloseLastScreen());
            }
        }
Exemple #2
0
 protected virtual void Awake()
 {
     m_screenRootScale   = m_screensRoot.localScale;
     m_audio             = IOCCore.Resolve <IAudio>();
     m_experienceMachine = IOCCore.Resolve <IExperienceMachine>();
     m_commonResource    = IOCCore.Resolve <ICommonResource>();
     m_settings          = IOCCore.Resolve <ISettings>();
     m_uiEngine          = IOCCore.Resolve <IUIEngine>();
 }
Exemple #3
0
 private void Awake()
 {
     m_uiEngine          = IOCCore.Resolve <IUIEngine>();
     m_experienceMachine = IOCCore.Resolve <IExperienceMachine>();
     m_network           = IOCCore.Resolve <INetwork>();
     m_photonView        = GetComponent <PhotonView>();
     m_animationEngine   = IOCCore.Resolve <IAnimationEngine>();
     m_webInterface      = IOCCore.Resolve <IWebInterface>();
     Debug.LogError("Subscribed: m_animationEngine.InteractionStateChange");
     m_animationEngine.InteractionStateChange += PlayerInteractionStateChange;
 }
Exemple #4
0
        protected void Awake()
        {
            m_experienceMachine = IOCCore.Resolve <IExperienceMachine>();
            m_audio             = IOCCore.Resolve <IAudio>();
            m_commonResource    = IOCCore.Resolve <ICommonResource>();
            m_settings          = IOCCore.Resolve <ISettings>();
            m_webInterface      = IOCCore.Resolve <IWebInterface>();
            m_network           = IOCCore.Resolve <INetwork>();
            m_uiEngine          = IOCCore.Resolve <IUIEngine>();

            AwakeOverride();
        }
Exemple #5
0
        private void Awake()
        {
            m_uiEngine                       = IOCCore.Resolve <IUIEngine>();
            m_experienceMachine              = IOCCore.Resolve <IExperienceMachine>();
            m_webInterface                   = IOCCore.Resolve <IWebInterface>();
            m_webInterface.OnUserDataUpdate += UserDataUpdate;

            if (!PhotonNetwork.IsConnectedAndReady)
            {
                PhotonNetwork.ConnectUsingSettings();
            }
        }
Exemple #6
0
        private void Awake()
        {
            m_uiEngine = IOCCore.Resolve <IUIEngine>();
            if (m_localScale == Vector3.zero)
            {
                m_localScale = transform.localScale;
            }

            foreach (var item in m_synchronizedElements)
            {
                FordiNetwork.RegisterPhotonView(item);
            }
        }
		public CoreEngine(IUIEngine uiEngine, IField field, IPlayer player, IActionProvider actionProvider = null, IMovement movement = null, ISolvedChecker solvedChecker = null)
		{
			this._uiEngine = uiEngine;
			this._inputProvider = uiEngine.InputProvider;
			this._field = field;
			this._player = player;
            this._highScores = HighScores.Instance;

			this.ActionProvider = actionProvider ?? new DefaultActionProvider(this);
			this.Movement = movement ?? new BackwardMovement(field);
			this.SolvedChecker = solvedChecker ?? new DefaultSolvedChecker();

			this.AttachUIToEvents();
		}
Exemple #8
0
        void Awake()
        {
            m_settings          = IOCCore.Resolve <ISettings>();
            m_experienceMachine = IOCCore.Resolve <IExperienceMachine>();
            m_webInterface      = IOCCore.Resolve <IWebInterface>();
            m_uiEngine          = IOCCore.Resolve <IUIEngine>();

            if (m_localScale == Vector3.zero)
            {
                m_localScale = transform.localScale;
            }

            foreach (var item in m_synchronizedElements)
            {
                FordiNetwork.RegisterPhotonView(item);
            }

            AwakeOverride();
        }
 protected virtual void AwakeOverride()
 {
     m_experienceMachine = ExperienceMachine;
     m_appTheme          = AppTheme;
     m_audio             = Audio;
     m_commonResource    = CommonResource;
     m_settings          = Settings;
     m_fordiNetwork      = FordiNetwork;
     m_webInterface      = WebInterface;
     m_network           = Network;
     m_voiceChat         = VoiceChat;
     //m_annotation = Annotation;
     m_settings        = Settings;
     m_uiEngine        = UIEngine;
     m_assetLoader     = AssetLoader;
     m_pluginHook      = PluginHook;
     m_permissions     = Permissions;
     m_animationEngine = AnimationEngine;
 }
Exemple #10
0
        private void Awake()
        {
            m_experienceMachine = IOCCore.Resolve <IExperienceMachine>();
            m_uiEngine          = IOCCore.Resolve <IUIEngine>();

            DynamicSettings dynamicSettings = null;
            var             configFilePath  = Path.Combine(Application.persistentDataPath, ConfigFile);

            if (File.Exists(configFilePath))
            {
                File.ReadAllText(configFilePath);
                try
                {
                    //using (FileStream stream = new FileStream(configFilePath, FileMode.Create, FileAccess.Write))
                    //{
                    //    Serializer.Serialize(stream, dynamicSettings);
                    //}

                    using (FileStream stream = new FileStream(configFilePath, FileMode.Open, FileAccess.Read))
                    {
                        dynamicSettings = Serializer.Deserialize <DynamicSettings>(stream);
                    }

                    dynamicSettings.Load();
                    return;
                }
                catch (Exception)
                {
                }
            }
            dynamicSettings = new DynamicSettings();
            dynamicSettings.Download();

            using (FileStream stream = new FileStream(configFilePath, FileMode.Create, FileAccess.Write))
            {
                Serializer.Serialize(stream, dynamicSettings);
            }
        }
Exemple #11
0
        private void Awake()
        {
            m_isRunning    = true;
            m_home         = GetComponentInChildren <Home>();
            m_lobby        = GetComponentInChildren <Lobby>();
            m_meeting      = GetComponentInChildren <MeetingExperience>();
            m_audio        = IOCCore.Resolve <IAudio>();
            m_uiEngine     = IOCCore.Resolve <IUIEngine>();
            m_settings     = IOCCore.Resolve <ISettings>();
            m_pluginHook   = IOCCore.Resolve <IPluginHook>();
            m_webInterface = IOCCore.Resolve <IWebInterface>();

            if (SceneManager.GetActiveScene().name == Networking.Network.MeetingRoom || SceneManager.GetActiveScene().name == Networking.Network.PrivateMeetingLocation)
            {
                Selection.Location       = SceneManager.GetActiveScene().name;
                Selection.ExperienceType = ExperienceType.MEETING;
            }

            SetExperience(GetExperience(Selection.ExperienceType));
            UIInteractionBase.OnClick += Click;
            ResetGuideConditions();
            m_pluginHook.AllPlatformDependenciesLoaded += AllPlatformDependenciesLoaded;
        }
Exemple #12
0
        public virtual void OpenMenu(IUserInterface userInterface, string text, bool blocked, bool persist)
        {
            m_userInterface = userInterface;
            Clear();
            Blocked = blocked;
            Persist = persist;
            gameObject.SetActive(true);
            m_description.text = text;

            if (m_uiEngine == null)
            {
                m_uiEngine = IOCCore.Resolve <IUIEngine>();
            }

            if (m_okButton != null)
            {
                m_okButton.onClick.AddListener(() => m_uiEngine.CloseLastScreen());
            }
            if (m_closeButton != null)
            {
                m_closeButton.onClick.AddListener(() => m_uiEngine.CloseLastScreen());
            }
        }
Exemple #13
0
 protected override void AwakeOverride()
 {
     base.AwakeOverride();
     m_vrMenu   = IOCCore.Resolve <IUserInterface>();
     m_uiEngine = IOCCore.Resolve <IUIEngine>();
 }
 protected override void AwakeOverride()
 {
     base.AwakeOverride();
     m_uiEngine = IOCCore.Resolve <IUIEngine>();
     m_dropdown = (TMP_Dropdown)selectable;
 }
Exemple #15
0
 protected override void Start()
 {
     base.Start();
     m_uiEngine = IOCCore.Resolve <IUIEngine>();
 }