protected async override Task WritePrologueToRemote()
        {
            //Debug.WriteLine("WritePrologueToRemote");
            await Prologue.WriteTo(SecureRemoteStream);

            //Debug.WriteLine("WritePrologueToRemote - DONE");
        }
Example #2
0
 // On Next button click, increase current script number
 public void OnNextButtonClick()
 {
     buttonClick = GameObject.Find("ButtonClickSound").GetComponent <AudioSource>();
     buttonClick.Play();
     Debug.Log("Next Button Click");
     Prologue.GetInstance().SetCurrentScript(1);
 }
Example #3
0
        public IEnumerator CoNormalAttack(int dmg, bool critical)
        {
            yield return(StartCoroutine(CoAnimationAttack(critical)));

            Prologue.PopupDmg(dmg, _target.gameObject, false, critical, ElementalType.Normal, false);
            _target.Animator.Hit();
        }
Example #4
0
 // On Yes button click, set answer as Yes
 public void OnYesButtonClick()
 {
     buttonClick = GameObject.Find("ButtonClickSound").GetComponent <AudioSource>();
     buttonClick.Play();
     Debug.Log("YES Button Click");
     Prologue.GetInstance().GetAnswer("<Yes>");
 }
Example #5
0
 async public Task WriteTo(NetworkStream stream)
 {
     Prologue.WriteTo(stream);
     if (Content != null)
     {
         await Content.CopyToAsync(stream, Content.Length);
     }
 }
Example #6
0
 // Set Collection Scripts
 public void SetScript()
 {
     this.collection_name = Prologue.GetInstance().GetScript("collectionName", GameSettings.GetInstance().GetLanguage());
     if (myCollection.n_collection != this.collection_name.Length)
     {
         Debug.Log("collection number error L " + myCollection.n_collection + ", " + this.collection_name.Length);
     }
     this.collection_info = Prologue.GetInstance().GetScript("collectionInfo", GameSettings.GetInstance().GetLanguage());
 }
Example #7
0
        async public Task WriteTo(SslStream stream)
        {
            Prologue.WriteTo(stream);
            await stream.FlushAsync();

            if (Content != null)
            {
                await Content.CopyToAsync(stream, Content.Length);
            }
        }
Example #8
0
    // On No button click, set answer as No and MoveMower..
    public void OnNoButtonClick()
    {
        buttonClick = GameObject.Find("ButtonClickSound").GetComponent <AudioSource>();
        buttonClick.Play();
        Debug.Log("NO Button Click");
        Prologue.GetInstance().GetAnswer("<No>");
        MowerController mowerController = GameObject.Find("LawnMower").GetComponent <MowerController>();

        mowerController.MoveMower();
    }
    public static void SavePlayer(Prologue progress)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/progress.dat";
        FileStream      stream    = new FileStream(path, FileMode.Create);

        ProgressData data = new ProgressData(progress);


        formatter.Serialize(stream, data);
        stream.Close();
    }
Example #10
0
    public void PrologueReview()
    {
        Click.Play();

        StoryManager.storyreview_0 = true;

        Stage.SetActive(false);
        Prologue.SetActive(true);

        GameObject.Find("BGM").GetComponent <AudioSource>().Stop();
        GameObject.Find("BGM_Pro").GetComponent <AudioSource>().Play();
    }
Example #11
0
 // return singleton prologue
 public static Prologue GetInstance()
 {
     if (prologue == null)
     {
         prologue = FindObjectOfType <Prologue>();
         if (prologue == null)
         {
             GameObject container = new GameObject("PopUps");
             prologue = container.AddComponent <Prologue>();
         }
     }
     return(prologue);
 }
Example #12
0
    // on tutorial button click, show tutorial popup and load first text
    // text depends on language
    public void OnTutorialButtonClick()
    {
        buttonClick = GameObject.Find("ButtonClickSound").GetComponent <AudioSource>();
        buttonClick.Play();
        Debug.Log("Tutorial button clicked!");

        PopUp.GetInstance().ShowPopUp("Tutorial", true);
        tutorialScripts = Prologue.GetInstance().GetScript("tutorial", GameSettings.GetInstance().GetLanguage());
        this.length     = tutorialScripts.Length;
        currentLine     = 0;
        string T_mark = "<Text>";

        PopUp.GetInstance().FindText("Tutorial").text = tutorialScripts[currentLine].Substring(T_mark.Length);
    }
Example #13
0
        private static string Read(string readLine)
        {
            if (readLine.StartsWith("http://"))
            {
                return("<" + readLine + ">");
            }
            var splitPrefixed = Prologue.SplitPrefixed(readLine);

            if (splitPrefixed.prefix == "bsbm-inst:")
            {
                string read = "<" + readLine.Replace("bsbm-inst:", "http://www4.wiwiss.fu-berlin.de/bizer/bsbm/v01/instances/") + ">";
                return(read);
            }
            return(readLine);
        }
Example #14
0
        public IEnumerator CoBlowAttack(ElementalType elementalType)
        {
            AttackEndCalled = false;
            yield return(StartCoroutine(CoAnimationCast(elementalType)));

            yield return(StartCoroutine(CoAnimationCastBlow(elementalType)));

            var dmgMap = new[] { 1374, 2748, 4122, 8244, 16488 };
            var effect = Game.instance.Stage.SkillController.Get <SkillBlowVFX>(_target.gameObject, elementalType, SkillCategory.BlowAttack, SkillTargetType.Enemies);

            effect.Play();
            for (var i = 0; i < 5; i++)
            {
                var sec = i == 0 ? 0 : i / 10f;
                Prologue.PopupDmg(dmgMap[i], _target.gameObject, false, i == 4, elementalType, false);
                _target.Animator.Hit();
                yield return(new WaitForSeconds(sec));
            }
        }
Example #15
0
    // Start is called before the first frame update
    void Start()
    {
        if (Application.internetReachability == NetworkReachability.NotReachable)
        {
            androidSet.ShowToast("offline mode", false);
            return;
        }

        if (SceneManager.GetActiveScene().buildIndex == (int)Constant.SceneNumber.PROLOGUE)
        {
            Prologue prologue = PrologueService.Instance.GetPrologueByContentTypeAndLanguage("prologue", (int)Application.systemLanguage);
            if (prologue == null)
            {
                Debug.Log("Failed to get prologue");
                return;
            }
            textUI.text = prologue.content;
            replay();
            StartCoroutine(DoScrollText());
        }
    }
Example #16
0
        public IEnumerator CoFinisher(int[] damageMap, bool[] criticalMap)
        {
            AttackEndCalled = false;
            var position = ActionCamera.instance.Cam.ScreenToWorldPoint(
                new Vector2((float)Screen.width / 2, (float)Screen.height / 2));

            position.z = 0f;
            var effect = Game.instance.Stage.objectPool.Get <FenrirSkillVFX>(position);

            effect.Stop();
            AudioController.instance.PlaySfx(AudioController.SfxCode.FenrirGrowlSkill);
            yield return(new WaitForSeconds(1f));

            Animator.Skill();
            ActionCamera.instance.Shake();
            yield return(new WaitUntil(() => AttackEndCalled));

            for (var i = 0; i < 2; i++)
            {
                var first = i == 0;
                if (first)
                {
                    effect.Play();
                }
                else
                {
                    Time.timeScale = 0.4f;
                }
                Prologue.PopupDmg(damageMap[i], _target.gameObject, false, criticalMap[i], ElementalType.Normal, false);
                _target.Animator.Hit();
                if (first)
                {
                    yield return(new WaitForSeconds(0.3f));
                }
                else
                {
                    _target.Animator.Die();
                }
            }
        }
Example #17
0
        public Prologue GetPrologueByContentTypeAndLanguage(string _contentType, int _language)
        {
            Prologue prologue = null;
            string   query    = "select * from prologue where content_type = '" + _contentType + "' and language = " + _language;

            MySqlConnector.Instance.DoSelectQuery(query, (MySqlDataReader reader) =>
            {
                // 데이터 없음
                if (reader == null)
                {
                    Debug.Log("No data");
                    return;
                }

                /////////// for debuging ///////////
                Debug.Log("Parsing data");
                //List<string> columns = GetDataReaderColumnNames(reader);
                //foreach (string col in columns)
                //{
                //    Debug.Log(col);
                //}
                //Debug.Log("reader: " + columns.ToString());
                /////////// for debuging ///////////

                int id             = int.Parse(reader["id"].ToString());
                string contentType = reader["content_type"].ToString();
                string content     = reader["content"].ToString();
                int language       = int.Parse(reader["language"].ToString());

                Debug.Log("Set data on the prologue");
                prologue = new Prologue {
                    id           = id,
                    content_type = contentType,
                    content      = content,
                    language     = language
                };
            });
            Debug.Log("return Prologue");
            return(prologue);
        }
            void InitializeProperties()
            {
                SelectedTrim.Subscribe((v) => {
                    SetTrimSettingsWith(v);
                });
                Prologue.Subscribe((v) => {
                    UpdateButtonStatus();
                });
                Epilogue.Subscribe((v) => {
                    UpdateButtonStatus();
                });
                PrologueEnabled.Subscribe((v) => {
                    UpdateButtonStatus();
                });
                EpilogueEnabled.Subscribe((v) => {
                    UpdateButtonStatus();
                });
                TrimmingName.Subscribe((v) => {
                    UpdateButtonStatus();
                });
                Started.Subscribe((V) => {
                    UpdatePlayingState();
                });
                Pausing.Subscribe((v) => {
                    UpdatePlayingState();
                });
                Duration.Subscribe((v) => {
                });

                CommandRegister.Subscribe(ExecRegister);
                CommandApply.Subscribe(ExecApply);
                CommandUpdate.Subscribe(ExecUpdate);
                CommandUndo.Subscribe(ExecUndo);
                CommandCancel.Subscribe(ExecCancel);
                CommandSelect.Subscribe(ExecSelect);

                Rating.Subscribe(ChangeRating);
            }
Example #19
0
        /// <inheritdoc />
        public IEnumerable <BasicBlock <TInstruction> > GetAllBlocks()
        {
            if (Prologue != null)
            {
                foreach (var block in Prologue.GetAllBlocks())
                {
                    yield return(block);
                }
            }

            foreach (var block in Contents.GetAllBlocks())
            {
                yield return(block);
            }

            if (Epilogue != null)
            {
                foreach (var block in Epilogue.GetAllBlocks())
                {
                    yield return(block);
                }
            }
        }
Example #20
0
    public void StageMenu()
    {
        if (PlayerPrefs.GetInt("Story") == 0)
        {
            Click.Play();

            GameObject.Find("BGM").GetComponent <AudioSource>().Stop();
            GameObject.Find("BGM_Pro").GetComponent <AudioSource>().Play();
            StoryManager.index = 0;

            if (Prologue.activeInHierarchy == false)
            {
                Prologue.SetActive(true);
                Main.SetActive(false);
            }
        }

        else
        {
            Stage.SetActive(true);
            Main.SetActive(false);
        }
    }
Example #21
0
        public IEnumerator CoDoubleAttack(int[] damageMap, bool[] criticalMap)
        {
            var go     = _target.gameObject;
            var effect = Game.instance.Stage.SkillController.Get <SkillDoubleVFX>(go, ElementalType.Fire, SkillCategory.DoubleAttack, SkillTargetType.Enemy);

            for (var i = 0; i < 2; i++)
            {
                var first = i == 0;

                yield return(StartCoroutine(CoAnimationAttack(!first)));

                if (first)
                {
                    effect.FirstStrike();
                }
                else
                {
                    effect.SecondStrike();
                }
                Prologue.PopupDmg(damageMap[i], go, false, criticalMap[i], ElementalType.Fire, false);
                _target.Animator.Hit();
                yield return(new WaitUntil(() => _target.Animator.IsIdle()));
            }
        }
Example #22
0
    public void Refresh()
    {
        if (UIWindow.IsLoaded())
        {
            UIWindow.AddCloseAction(Refresh);
            return;
        }

        if (LobbyScene.Get().GetBattleStage().IsLoaded())
        {
            LobbyScene.Get().GetBattleStage().AddUnloadAction(Refresh);
            return;
        }

        if (Prologue.IsLoaded())
        {
            UIWindow.AddCloseAction(Refresh);
        }

        DestroyChildren(gridParent);
        RefreshVisibleQuest();

        List <MtQuest> questList = new List <MtQuest>(visibleQuestDic.Values);

        questList.Sort(new QuestIDXComparer());

        bool hasMainQuest = false;

        List <QuestProgressText> progressTextList = new List <QuestProgressText>();

        if (questList.Count > 0)
        {
            foreach (MtQuest quest in questList)
            {
                QuestProgressText questProgressText = QuestProgressText.Create(gridParent, this, quest);

                progressTextList.Add(questProgressText);

                if (pointingReserved.Contains(quest.IDX) && !UITutorial.IsLoaded() && questProgressText.gameObject.activeSelf)
                {
                    if (UIQuestConversation.IsLoaded() || UIPointingFinger.IsLoaded() || UIWindow.IsLoaded() || Prologue.IsLoaded() || UIBuildResult.IsLoaded())
                    {
                        StartCoroutine(CheckRoutin(quest, questProgressText));
                    }
                    else
                    {
                        questProgressText.StartPointingOnMission();
                        pointingReserved.Remove(quest.IDX);
                    }
                }
                else
                {
                    pointingReserved.Remove(quest.IDX);
                }

                foreach (MtQuestMission mission in quest.Missions)
                {
                    if (!mission.IsAccomplished())
                    {
                        MissionProgressText.Create(questProgressText.transform, quest, mission);
                        break;
                    }
                }

                if (quest.QuestType == MtQuestTypes.MainStory)
                {
                    hasMainQuest = true;
                }
            }
        }

        if (!hasMainQuest && !UIQuestConversation.IsLoaded())
        {
            MtQuest quest = MtDataManager.GetQuestDataFromPreRequirementIDX(AccountInfo.instance.questStep);

            if (quest != null)
            {
                QuestProgressText questProgressText = QuestProgressText.Create(gridParent, this, quest, true);
                questProgressText.transform.SetAsFirstSibling();

                questList.Add(quest);
            }
        }

        zoomButton.SetActive(questList.Count > 0);

        if (questList.Count == 0)
        {
            ZoneTerrain.Get().zoneTiles.RefreshQuestMarks();
        }
        else
        {
            foreach (MtQuest quest in questList)
            {
                foreach (MtQuestMission missionInfo in quest.Missions)
                {
                    int x = 0, y = 0;

                    if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromCastle)
                    {
                        x = missionInfo.TargetIndex1 + AccountInfo.instance.castlePositionX;
                        y = missionInfo.TargetIndex2 + AccountInfo.instance.castlePositionY;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromSherinStation)
                    {
                        x = MtStatic.SherinStationX;
                        y = MtStatic.SherinStationY;

                        MtTileInfo.GetPositionOnMyField(MtStatic.SherinStationX, MtStatic.SherinStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromWooboldVillageStation)
                    {
                        x = MtStatic.WooboldVillageStationX;
                        y = MtStatic.WooboldVillageStationY;

                        MtTileInfo.GetPositionOnLavaField(MtStatic.WooboldVillageStationX, MtStatic.WooboldVillageStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromOldCastleStation)
                    {
                        x = MtStatic.OldCastleStationX;
                        y = MtStatic.OldCastleStationY;

                        MtTileInfo.GetPositionOnMyField(MtStatic.OldCastleStationX, MtStatic.OldCastleStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromLahindelStation)
                    {
                        x = MtStatic.LahindelStationX;
                        y = MtStatic.LahindelStationY;

                        MtTileInfo.GetPositionOnMyField(MtStatic.LahindelStationX, MtStatic.LahindelStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromMarenStation)
                    {
                        x = MtStatic.MarenStationX;
                        y = MtStatic.MarenStationY;

                        MtTileInfo.GetPositionOnMyField(MtStatic.MarenStationX, MtStatic.MarenStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromDotakCastle)
                    {
                        x = MtStatic.DotakCastleStationX;
                        y = MtStatic.DotakCastleStationY;

                        MtTileInfo.GetPositionOnLavaField(MtStatic.DotakCastleStationX, MtStatic.DotakCastleStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromTitansGardenStation)
                    {
                        x = MtStatic.TitansGardenStationX;
                        y = MtStatic.TitansGardenStationY;

                        MtTileInfo.GetPositionOnLavaField(MtStatic.TitansGardenStationX, MtStatic.TitansGardenStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }
                    else if (missionInfo.ActionType == MtMissionActionTypes.GotoLocationFromLastStageStation)
                    {
                        x = MtStatic.LastStageStationX;
                        y = MtStatic.LastStageStationY;

                        MtTileInfo.GetPositionOnLavaField(MtStatic.LastStageStationX, MtStatic.LastStageStationY, out x, out y, AccountInfo.instance.castlePositionX, AccountInfo.instance.castlePositionY);

                        x += missionInfo.TargetIndex1;
                        y += missionInfo.TargetIndex2;
                    }

                    if (x != 0 || y != 0)
                    {
                        ZoneTile tile = ZoneTerrain.Get().zoneTiles.GetTileByXY(x, y);
                        if (tile != null)
                        {
                            tile.Refresh3D();
                        }
                    }
                }
            }
        }

        if (questList.Count == 0)
        {
            backPanelImg.enabled = false;
        }
        else
        {
            backPanelImg.enabled = true;
        }

        RefreshHeight();
    }
Example #23
0
    private IEnumerator CheckRoutin(MtQuest quest, QuestProgressText questProgressText)
    {
        while (UIQuestConversation.IsLoaded() || UIPointingFinger.IsLoaded() || UIWindow.IsLoaded() || Prologue.IsLoaded() || UIBuildResult.IsLoaded() || (!questBoxAnimator.GetCurrentAnimatorStateInfo(0).IsName("Show") && !questBoxAnimator.GetCurrentAnimatorStateInfo(0).IsName("IDLE")))
        {
            yield return(new WaitForSeconds(0.3f));
        }

        //if(quest.IsAccomplished())
        questProgressText.StartPointingOnMission();

        pointingReserved.Remove(quest.IDX);

        yield return(null);
    }
Example #24
0
 internal static List <PlotObserver.ObjectiveNode> GetStartPoint()
 {
     LivelyMail();
     return(Prologue.StartPoint().ToList());
 } //定义开始的节点及行为
Example #25
0
 public byte[] GetData()
 {
     return(Prologue.Concat(PageData.SelectMany(p => p)).Concat(Epilogue).ToArray());
 }
Example #26
0
 protected async virtual Task WritePrologueToRemote()
 {
     await Prologue.WriteTo(RemoteStream);
 }
Example #27
0
    public void QuitApplication()
    {
        Click.Play();

        if (!Prologue.activeInHierarchy && !Epilogue.activeInHierarchy &&
            !Extra.activeInHierarchy && !Stage.activeInHierarchy)
        {
            Application.Quit();
        }

        else if (Prologue.activeInHierarchy)
        {
            Prologue.SetActive(false);
            Stage.SetActive(true);

            GameObject.Find("BGM").GetComponent <AudioSource>().Play();
            GameObject.Find("BGM_Pro").GetComponent <AudioSource>().Stop();

            if (PlayerPrefs.GetInt("Story") == 0)
            {
                PlayerPrefs.SetInt("Story", 1);
            }

            StoryManager.storyreview_0 = false;
            StoryManager.index         = 0;
        }

        else if (Epilogue.activeInHierarchy)
        {
            Epilogue.SetActive(false);
            Stage.SetActive(true);

            GameObject.Find("BGM").GetComponent <AudioSource>().Play();
            GameObject.Find("BGM_Epi").GetComponent <AudioSource>().Stop();

            StoryManager.storyreview_2 = false;
            StoryManager.index         = 0;
        }


        else if (Extra.activeInHierarchy)
        {
            Extra.SetActive(false);
            Stage.SetActive(true);

            GameObject.Find("BGM").GetComponent <AudioSource>().Play();
            GameObject.Find("BGM_Extra").GetComponent <AudioSource>().Stop();
            GameObject.Find("BGM_Extra2").GetComponent <AudioSource>().Stop();

            if (PlayerPrefs.GetInt("Story") == 3)
            {
                PlayerPrefs.SetInt("Story", 4);
            }

            StoryManager.storyreview_3 = false;
            StoryManager.index         = 0;
        }

        else if (Stage.activeInHierarchy)
        {
            Stage.SetActive(false);
            Main.SetActive(true);
        }

        //UnityEditor.EditorApplication.isPlaying = false;
    }
Example #28
0
 void Awake()
 {
     tutorialScripts = Prologue.GetInstance().GetScript("tutorial", GameSettings.GetInstance().GetLanguage());
     this.length     = tutorialScripts.Length;
 }
Example #29
0
 public SparqlResultSet(Prologue prologue = null)
 {
     this.prologue = prologue;
 }
Example #30
0
 public SparqlResultSet(SparqlQuery query, Prologue prologue = null)
 {
     Query         = query;
     this.prologue = prologue;
 }