Esempio n. 1
0
 protected override void onTrigger(GameObject interactor)
 {
     if (ClearAllSequence)
     {
         TextboxManager.ClearAllSequences();
     }
     TextboxManager.SetSoundType(soundType);
     if (ClearAllSequence)
     {
         TextboxManager.ClearAllSequences();
     }
     TextboxManager.StartSequence(TextboxString, null, Skippable);
 }
Esempio n. 2
0
 protected virtual void triggerText()
 {
     TriggerUsed     = true;
     currentInterval = interval;
     if (ClearAllSequence)
     {
         TextboxManager.ClearAllSequences();
     }
     TextboxManager.SetSoundType(soundType);
     if (ClearAllSequence)
     {
         TextboxManager.ClearAllSequences();
     }
     TextboxManager.StartSequence(value, null, Skippable);
 }
Esempio n. 3
0
    public override string PerformAction(string actionString, Textbox originTextbox)
    {
        string raw = originTextbox.MasterSequence.RawText;

        string targetTag = ExtractArgs(actionString, "@")[0];
        //Debug.Log ("Looking for tag: " + targetTag);
        int           startInt = 0;
        int           depth    = 0;
        List <string> tags     = new List <string>();

        for (int i = 0; i < raw.Length; i++)
        {
            char c = raw.ToCharArray() [i];
            if (c == '<')
            {
                depth++;
                tags.Insert(0, "");
            }
            else if (c == '>')
            {
                depth--;
                Debug.Log("Comparing: " + tags [0] + " to " + targetTag);
                if (tags[0] == targetTag)
                {
                    startInt = i;
                    break;
                }
                tags.RemoveAt(0);
            }
            else
            {
                List <string> newTags = new List <string> ();
                for (int j = 0; j < tags.Count; j++)
                {
                    newTags.Insert(j, tags [j] + c);
                }
                tags = newTags;
            }
        }
        if (startInt != 0)
        {
            originTextbox.MasterSequence.closeSequence();
            TextboxManager.StartSequence(raw.Substring(startInt + 1));
        }
        return("");
    }
Esempio n. 4
0
 protected virtual void PlayerMovement()
 {
     m_inputMove = new Vector2(0f, 0f);
     if (InputManager.GetButton("Left"))
     {
         m_inputMove.x -= 1f;
     }
     if (InputManager.GetButton("Right"))
     {
         m_inputMove.x += 1f;
     }
     if (InputManager.GetButton("Up"))
     {
         m_inputMove.y += 1f;
     }
     if (InputManager.GetButton("Down"))
     {
         m_inputMove.y -= 1f;
         if (InputManager.GetButtonDown("Down"))
         {
             //Debug.Log (Time.timeSinceLevelLoad + " : " + m_lastDownTime);
             if (Time.timeSinceLevelLoad - m_lastDownTime < DOUBLE_TAP_DROP_INTERVAL)
             {
                 m_physics.setDropTime(0.2f);
             }
             m_lastDownTime = Time.timeSinceLevelLoad;
         }
     }
     m_jumpDown = InputManager.GetButtonDown("Jump");
     m_jumpHold = InputManager.GetButton("Jump");
     if (CanJump)
     {
         JumpMovement();
     }
     SetDirectionFromInput();
     if (InputManager.GetButtonDown("Quicksave"))
     {
         SaveObjManager.Instance.SaveProfile("QuickSave");
         TextboxManager.StartSequence("~QuickSave Successful");
     }
     else if (InputManager.GetButtonDown("Quickload"))
     {
         PauseGame.QuickLoad();
     }
 }
Esempio n. 5
0
 // Use this for initialization
 void Update()
 {
     if (ItemDropped != null && !GetComponent <Attackable>().Alive)
     {
         Instantiate(ItemDropped, transform.position, Quaternion.identity);
         ItemDropped = null;
         if (StopMusic)
         {
             AudioManager.instance.StopMusic();
         }
         if (DeathQuote != "")
         {
             TextboxManager.StartSequence(DeathQuote);
         }
         if (LoadScene != "")
         {
             Initiate.Fade(LoadScene, Color.white, 1.5f);
         }
     }
 }
Esempio n. 6
0
    protected override void onTrigger(GameObject interactor)
    {
        Debug.Log("On Trigger");
        if (ClearAllSequence)
        {
            TextboxManager.ClearAllSequences();
        }
        TextboxManager.SetSoundType(soundType);
        if (ClearAllSequence)
        {
            TextboxManager.ClearAllSequences();
        }
        string txt = TextboxString;

        if (textFilePath.Length > 0)
        {
            TextAsset mytxtData = (TextAsset)Resources.Load("MyText");
            txt = mytxtData.text;
        }
        TextboxManager.StartSequence(txt, null, Skippable);
    }
 // Update is called once per frame
 void Update()
 {
     if (CanPause && Input.GetButtonDown("Pause"))
     {
     }
     if (DebugSave)
     {
         if (Input.GetButtonDown("QuickSave") && Time.timeSinceLevelLoad > LastQuickSave + QUICKSAVEBUFFER)
         {
             SaveObjManager.Instance.SaveProfile("QuickSave");
             TextboxManager.StartSequence("~QuickSave Successful");
             LastQuickSave = Time.timeSinceLevelLoad;
         }
         else if (Input.GetButtonDown("QuickLoad"))
         {
             bool result = SaveObjManager.Instance.LoadProfile("QuickSave");
             if (result == false)
             {
                 SaveObjManager.Instance.LoadProfile("AutoSave");
             }
         }
     }
 }
Esempio n. 8
0
 private void SelectionFunction(DialogueOption dop)
 {
     Debug.Log("Starting seqeunce: " + dop.remainderText);
     TextboxManager.StartSequence(dop.remainderText);
     GameObject.Destroy(dop.MasterBox.gameObject);
 }
Esempio n. 9
0
 void DisplayLevelUp()
 {
     TextboxManager.StartSequence("~RANK UP! LEVEL " + (Instance.Level + 1) + levelUpStr);
     levelUpStr = "";
     Instance.Level++;
 }