Ejemplo n.º 1
0
        private void requestTalk(Player player)
        {
            TalkManager.getInstance().talk(MASSAGES);
            var createdQuest = creatQuest(player.getFlagList());

            player.undertake(createdQuest);
        }
Ejemplo n.º 2
0
    public void EnterCombat()
    {
        needToTalk = true;
        typeTalk   = CombatTalk.EnterCombat;

        currentTurn = null;
        index       = 0;
        roundIt     = 0;

        if (iteration == 0)
        {
            customTalk.NewTalkScripted(ScriptText, 2, 2);
        }
        if (iteration == 1)
        {
            customTalk.NewTalkScripted(ScriptText, 15, 15);
        }
        else
        {
        }

        iteration++;

        GameObject g = GameObject.FindGameObjectWithTag("CombatManager");

        if (g != null && g.GetComponent <CombatManager>().talkManager != null)
        {
            TalkManager sm = g.GetComponent <CombatManager>().talkManager;
            monsters      = sm.customTalk;
            combatManager = g.GetComponent <CombatManager>();
        }
    }
 private void Awake()
 {
     Instance = this;
     talkButton.onClick.AddListener(OnTalkButtonClick);
     MyTools.SetActive(talkButton.gameObject, false);
     Flowchart = FindObjectOfType <Fungus.Flowchart>();
 }
Ejemplo n.º 4
0
 void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
Ejemplo n.º 5
0
    public void Talk()
    {
        GameObject g = GameObject.FindGameObjectWithTag("CombatManager");

        if (g != null && g.GetComponent <CombatManager>())
        {
            bool remind = false;

            if (theyLeftOnce && combatJustStarted)
            {
                remind            = true;
                combatJustStarted = false;
            }


            TalkManager sm = g.GetComponent <CombatManager>().talkManager;
            sm.customTalk.NewTalkBard(currentLine, remind, combatJustEnded);
            currentLine++;

            if (currentLine == 25)
            {
                endStory = true;
            }
        }
    }
Ejemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     talkManger = GameObject.Find("Canvas").GetComponent <TalkManager>();
     if (null == talkManger)
     {
         Debug.LogError("Talk Manager Canvas is NULL !! ");
     }
 }
Ejemplo n.º 7
0
 void Awake()
 {
     if (Instance == null) {
         Instance = this;
         gameObject.AddComponent<DialogueManager>();
     } else {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 8
0
        public void DeleteUser(Guid id)
        {
            //Check Token validity

            //Check guid is valid

            var talkManager = new TalkManager(_logger);

            talkManager.DeleteTalk(id);
        }
Ejemplo n.º 9
0
    // Use this for initialization
    void Start()
    {
        GameObject g = GameObject.FindGameObjectWithTag("CombatManager");

        if (g != null && g.GetComponent <CombatManager>().talkManager != null)
        {
            combatManager = g.GetComponent <CombatManager>();
            TalkManager sm = g.GetComponent <CombatManager>().talkManager;
            monsters = sm.customTalk;
        }
    }
Ejemplo n.º 10
0
 void Start()
 {
     talkManager = GameObject.Find("TalkManager").GetComponent<TalkManager>();
     stageManager = GameObject.Find("StageManager").GetComponent<StageManager>();
     charas = GameObject.FindGameObjectsWithTag("Character");
     fpController = GetComponent<FirstPersonController>();
     for(int i=0; i<charas.Length; i++){
         character.Add(new CharacterViewController());
         character[i] = charas[i].GetComponent<CharacterViewController>();
     }
 }
Ejemplo n.º 11
0
    private void Awake()
    {
        instance = this;

        // 함수 사용 기록 초기화
        usedFunction = new List <bool>();
        for (int i = 0; i < 100; i++)
        {
            usedFunction.Add(false);
        }
    }
Ejemplo n.º 12
0
 void Start()
 {
     talkManager  = GameObject.Find("TalkManager").GetComponent <TalkManager>();
     stageManager = GameObject.Find("StageManager").GetComponent <StageManager>();
     charas       = GameObject.FindGameObjectsWithTag("Character");
     fpController = GetComponent <FirstPersonController>();
     for (int i = 0; i < charas.Length; i++)
     {
         character.Add(new CharacterViewController());
         character[i] = charas[i].GetComponent <CharacterViewController>();
     }
 }
Ejemplo n.º 13
0
    //public GameObject TalkSet;
    //public Image left;
    //public Image right;
    //public Text text;
    // Factory method that generates a playable based on this asset
    public override Playable CreatePlayable(PlayableGraph graph, GameObject go)
    {
        //Instantiate (enemy, spawn, Quaternion.identity);
        var n = new TalkManager();

        n.Talk = Talk;
        //n.TalkSet = TalkSet;
        //n.left = left;
        //n.right = right;
        //n.text = text;
        return(ScriptPlayable <TalkManager> .Create(graph, n));
    }
Ejemplo n.º 14
0
 void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         gameObject.AddComponent <DialogueManager>();
     }
     else
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 15
0
    void Awake()
    {
        if (TalkManager.Instance == null)
        {
            TalkManager.Instance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }

        Init();
    }
Ejemplo n.º 16
0
 // Start is called before the first frame update
 void Start()
 {
     #region SingleTon
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != null)
     {
         Destroy(this);
     }
     #endregion
 }
        static void ProcessParse()
        {
            if (parser == null)
            {
                Console.Instance.WriteErrorLine("Load talks file after parsing!");
                return;
            }

            parser.ParseStart();
            manager = new TalkManager(parser.Title, parser.Talks);

            Console.Instance.WriteLine($"{parser.Talks.Where(x => x.State == TalkState.Message).Count().ToString("#,#")} talks found!");
        }
Ejemplo n.º 18
0
    IEnumerator ActiveWindow()
    {
        while (true)
        {
            if (!TalkManager.Getinstance().TalkWindow.activeSelf)
            {
                shop.Window.SetActive(true);
                UIManager.Getinstance().Panel.SetActive(false);
                StopCoroutine("ActiveWindow");
            }

            yield return(new WaitForSeconds(0.5f));
        }
    }
Ejemplo n.º 19
0
    public void Init()
    {
        if (GameObject.Find("Canvas").transform.Find("TextBackground") == null)
        {
            return;
        }

        background = GameObject.Find("Canvas").transform.Find("TextBackground").gameObject;
        TalkManager tm = background.AddComponent <TalkManager>();

        Managers.Instance.TalkInit(tm);
        name    = background.transform.Find("NameText").GetComponent <Text>();
        context = background.transform.Find("Text").GetComponent <Text>();
        btn     = background.transform.Find("NextBtn").GetComponent <Button>();
    }
Ejemplo n.º 20
0
        public void act()
        {
            if (isCleard && !TalkManager.getInstance().getIsTalking())
            {
                quest.activateCompensation(cleardPlayer);
                cleardPlayer.deleteQuest(quest);
                cleardPlayer = null;
                isCleard     = false;

                if (needTown)
                {
                    livingTown.questCleared(this);
                }
            }
        }
Ejemplo n.º 21
0
    public void Talk()
    {
        GameObject g = GameObject.FindGameObjectWithTag("CombatManager");

        if (g != null && g.GetComponent <CombatManager>())
        {
            TalkManager sm = g.GetComponent <CombatManager>().talkManager;
            sm.customTalk.NewTalkED(currentLine);
            currentLine++;

            if (currentLine == 10)
            {
                currentLine = 0;
            }
        }
    }
Ejemplo n.º 22
0
    public void OnCollisionEnter2D(Collision2D collision)
    {
        if (collision.gameObject.tag == "Search")
        {
            mirraImage.SetActive(true);
            isSearchPoint = true;
            searchMode    = collision.gameObject.GetComponent <SearchMode>();
        }

        if (collision.gameObject.tag == "Talk")
        {
            isTalk                  = true;
            talkManager             = collision.gameObject.GetComponent <TalkManager>();
            gameManager.talkManager = talkManager;
        }
    }
Ejemplo n.º 23
0
    public static TalkManager Getinstance()
    {
        if (instance == null)
        {
            instance = FindObjectOfType <TalkManager>();

            if (instance == null)
            {
                Debug.LogError("There Needs to one Active TalkManager Script a GameObject in your Scene");
            }

            return(instance);
        }

        return(instance);
    }
Ejemplo n.º 24
0
 public void ConversePlayer()
 {
     if (ConverseDistance > GetDistance())
     {
         if (TalkManager.Getinstance().HaveTalk(npcID))
         {
             Debug.Log(npcID);
             TalkManager.Getinstance().NPC_Name.text = Name;
             TalkManager.Getinstance().TalkToNPC(npcID);
         }
         StartCoroutine("ActiveWindow");
     }
     else
     {
         shop.Window.SetActive(false);
     }
 }
Ejemplo n.º 25
0
 public int dialog;          //dialog는 최근 진행한 대화
 private void Start()
 {
     if (!space)
     {
         space = Resources.Load <GameObject>("Prefabs/space");
     }
     if (tm == null)
     {
         tm = FindObjectOfType <TalkManager>();
     }
     if (p == null)
     {
         p = FindObjectOfType <Player>();
     }
     sr = GetComponent <SpriteRenderer>();
     St();
     Debug.DrawRay((Vector2)transform.position + rayorigin, raydir * raydistance, Color.green, float.PositiveInfinity);
 }
Ejemplo n.º 26
0
        public void act()
        {
            bonusKeeper.advanceLimit();

            if (!Menu.getIsDisplaying() && !TalkManager.getInstance().getIsTalking())
            {
                if (Input.GetKeyDown(KeyCode.E))
                {
                    GameObject menuObject = MonoBehaviour.Instantiate(menuPrefab, new Vector3(874f, 384f, 0f), new Quaternion(0, 0, 0, 0));
                    Menu       menu       = menuObject.GetComponent <Menu>();
                    menu.transform.SetParent(CanvasGetter.getCanvasElement().transform);
                    menu.setState(this, party);
                }
                else if (Input.GetKeyDown(KeyCode.Mouse0) && !TalkManager.getInstance().getIsTalking())
                {
                    searchFront();
                }
            }
        }
Ejemplo n.º 27
0
        public static bool NoSoftlocky(TalkManager __instance, ref int dollIndex)
        {
            if (HP2SR.AllPairsEnabled.Value)
            {
                PuzzleStatusGirl psg = Game.Session.Puzzle.puzzleStatus.GetStatusGirl(dollIndex > 0);

                if (psg.girlDefinition.id > 12)
                {
                    Game.Manager.Audio.Play(AudioCategory.SOUND, Game.Manager.Ui.sfxReject, Game.Session.gameCanvas.GetDoll(dollIndex > 0).pauseDefinition);
                    if (Game.Manager.Windows.IsWindowActive(null, true, false))
                    {
                        Game.Manager.Windows.ShowWindow(Game.Session.Location.actionBubblesWindow, true);
                        Game.Manager.Windows.HideWindow();
                    }
                    return(false);
                }
            }
            return(true);
        }
Ejemplo n.º 28
0
    private void Init()
    {
        cc = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterController>();

        audioManager    = new AudioManager(this);
        uiManager       = new UIManager(this);
        sceneManager    = new SceneManager(this);
        positionManager = new PositionManager(this);
        recallManager   = new RecallManager(this);
        talkManager     = new TalkManager(this);
        headManager     = new HeadManager(this);

        audioManager.OnInit();
        uiManager.OnInit();
        sceneManager.OnInit();
        positionManager.OnInit();
        recallManager.OnInit();
        talkManager.OnInit();
        headManager.OnInit();
    }
Ejemplo n.º 29
0
    private void Start()
    {
        talkManager  = GameObject.Find("TalkManager").GetComponent <TalkManager>();
        questManager = GameObject.Find("QuestManager").GetComponent <QuestManager>();
        player       = GameObject.Find("Player").GetComponent <Transform>();

        //talkText = GameObject.Find("Canvas").transform.Find("Talk Set").GetComponentInChildren<Text>();
        talkPanel    = GameObject.Find("Canvas").transform.Find("Talk Set").GetComponent <Animator>();
        typeEffect   = talkPanel.transform.Find("Text").GetComponent <TypeEffect>();
        portraitImg  = talkPanel.transform.Find("Portrait").GetComponent <Image>();
        portraitAnim = talkPanel.transform.Find("Portrait").GetComponent <Animator>();
        menuSet      = GameObject.Find("Canvas").transform.Find("Menu Set").GetComponent <Transform>();
        questText    = menuSet.transform.Find("Quest Panel").GetComponentInChildren <Text>();
        buttonPanel  = menuSet.transform.Find("Button Panel").GetComponent <Transform>();

        exitButton = buttonPanel.transform.Find("Exit").GetComponent <Button>();
        exitButton.onClick.AddListener(GameExit);

        saveButton = buttonPanel.transform.Find("Save").GetComponent <Button>();
        saveButton.onClick.AddListener(GameSave);

        GameLoad();
        questText.text = questManager.CheckQuest();
    }
Ejemplo n.º 30
0
    public virtual void ActionTalk(ActionType action, float roll)
    {
        /*
         * GameObject g = GameObject.FindGameObjectWithTag("CombatManager");
         * if (g != null && g.GetComponent<CombatManager>().scriptManager != null && g.GetComponent<CombatManager>().scriptManager.currentTurn != null)
         * {
         *  // int index = g.GetComponent<CombatManager>().GetNextIndexLine();
         *  int index = g.GetComponent<CombatManager>().scriptManager.currentTurn.indexLineStart;
         *
         *  if (index != -1)
         *  {
         *      ScriptManager sm = g.GetComponent<CombatManager>().scriptManager;
         *      sm.rpgTalk.lineToStart = index;
         *      sm.rpgTalk.lineToBreak = index;
         *      sm.rpgTalk.follow = currentUI.dialogueAnchor.gameObject;
         *      sm.rpgTalk.NewTalk();
         *  }
         * }
         */


        GameObject g = GameObject.FindGameObjectWithTag("CombatManager");

        if (g != null && g.GetComponent <CombatManager>().talkManager != null && g.GetComponent <CombatManager>().protoScript == null)
        {
            TalkManager sm = g.GetComponent <CombatManager>().talkManager;
            // sm.customTalk.follow = currentUI.dialogueAnchor.gameObject;
            sm.customTalk.NewTalk(eCreatureType, action, roll);
        }
        else if (g != null && g.GetComponent <CombatManager>().talkManager != null && g.GetComponent <CombatManager>().protoScript != null)
        {
            //g.GetComponent<CombatManager>().protoScript.combat.monsters.follow = currentUI.dialogueAnchor.gameObject;

            g.GetComponent <CombatManager>().protoScript.combat.Talk();
        }
    }
Ejemplo n.º 31
0
 //初期化
 public void Init(TalkManager talkManager)
 {
     this.talkManager = talkManager;
 }
Ejemplo n.º 32
0
 void OnDestroy()
 {
     if (Instance == this) {
         Instance = null;
     }
 }
Ejemplo n.º 33
0
 void Start()
 {
     talkManager = TalkTrigger.GetComponent <TalkManager>();
 }