Exemple #1
0
 void Awake()
 {
     Dialoguer.Initialize();
     startTime     = Time.time;
     startPosition = transform.position;
     destination   = new Vector3(startPosition.x + 2, startPosition.y, startPosition.z);
 }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        player = (playerScript)FindObjectOfType(typeof(playerScript));

        sceneInit();

        if (loadNewXML || !Dialoguer.isInitialized())
        {
            Dialoguer.Initialize(dialoguer);
            GameManager.offset = 0;

            if (GameManager.offset == 0)
            {
                GameManager.offset = setOffset;
            }

            setOffset = 0;
        }

        GameManager.dialogueJustFinished = false;

        if (autoPlay)
        {
            playDialogue();
        }
    }
Exemple #3
0
 void Start()
 {
     inputMgr    = GameManager.Inst().InputManager();
     dialogueMgr = GameManager.Inst().DialogueManager();
     Dialoguer.Initialize();
     SetupDialogueEvents();
     origContinuePosX = continuePrompt.position.x;
     audioSrc         = gameObject.AddComponent <AudioSource>();
     audioSrc.clip    = textSound;
 }
    // Use this for initialization
    void Start()
    {
        // Initialize the Dialoguer
        Dialoguer.Initialize();

        addDialoguerEvents();

        _showDialogueBox = false;

        //Invoke("startWindowTweenIn", 1);
        //Invoke("startWindowTweenOut", 5);
    }
Exemple #5
0
    //private string returnedString = string.Empty;

    void Start()
    {
        // Initialize the Dialoguer
        Dialoguer.Initialize();

        // If the Global Variables state already exists, LOAD it into Dialoguer
        if (PlayerPrefs.HasKey(GLOBAL_VARIABLE_SAVE_KEY))
        {
            Dialoguer.SetGlobalVariablesState(PlayerPrefs.GetString(GLOBAL_VARIABLE_SAVE_KEY));
            //returnedString = PlayerPrefs.GetString(GLOBAL_VARIABLE_SAVE_KEY);
        }
    }
    //private string returnedString = string.Empty;

    void Start()
    {
        // Initialize the Dialoguer
        Dialoguer.Initialize();

        // If the Global Variables state already exists, LOAD it into Dialoguer
        if (PlayerPrefs.HasKey(GLOBAL_VARIABLE_SAVE_KEY))
        {
            Dialoguer.SetGlobalVariablesState(PlayerPrefs.GetString(GLOBAL_VARIABLE_SAVE_KEY));
            //returnedString = PlayerPrefs.GetString(GLOBAL_VARIABLE_SAVE_KEY);
        }
        //		This can be saved anywhere, and loaded from anywhere the user wishes
        //		To save the Global Variable State, get it with Dialoguer.GetGlobalVariableState() and save it where you wish
    }
 void Awake()
 {
     initComponent();
     Dialoguer.Initialize();
     if (PlayerPrefs.HasKey("loadgame"))
     {
         PlayerPrefs.DeleteKey("loadgame");
         if (checkGameData())
         {
             LoadGame();
         }
         else
         {
             DM.tipContent = "当前没有存档,无法读取。";
             DM.tipTime    = 3f;
         }
     }
 }
Exemple #8
0
    public void startGame()
    {
        Dialoguer.Initialize("chapter2");
        // Initialize various managers for the game
        // Singleton pattern

        DontDestroyOnLoad(GameManager.Instance);
        DontDestroyOnLoad(SoundManager.Instance);
        GameManager.Instance.startState(test_Mode, sceneName);

        switch (GameManager.currentEpisode)
        {
        case 0:
            //GameManager.npcConversations[(int)NPCNames.Shammy] = 1;
            //GameManager.npcConversations[(int)NPCNames.CarlosFranco] = 4;
            //GameManager.npcConversations[(int)NPCNames.NoelAlt] = 3;
            //GameManager.offset = 8;
            break;
        }
    }
Exemple #9
0
 void Start()
 {
     Dialoguer.Initialize();
     if (PlayerPrefs.GetInt("currentSaveData") != 0)
     {
         int x = PlayerPrefs.GetInt("currentSaveData");
         if (PlayerPrefs.GetInt("hasSaveData" + x.ToString()) != 0)
         {
             GDM.LoadGame();
         }
         else
         {
             Application.LoadLevel("0");
         }
     }
     else
     {
         Application.LoadLevel("0");
     }
 }
    void Start()
    {
        Dialoguer.Initialize();

//		DialoguerEvents
        Dialoguer.events.ClearAll();
        //observe text init
        gCon          = GameController.instance;
        obsTextPrefab = gCon.gameSettings.observeText;
        obsTextObj    = Instantiate(obsTextPrefab, Vector3.zero, Quaternion.identity) as GameObject;
        obsTextObj.transform.SetParent(gCon.dialogueHolder.transform);
        obsTextObj.GetComponent <RectTransform> ().localPosition = obsTextPrefab.transform.position;
        obsTextObj.GetComponent <RectTransform> ().localScale    = Vector3.one;
        obsTextC = obsTextObj.GetComponentInChildren <Text> ();

        obsTextObj.SetActive(false);


        //continue button init
        continueButtonPrefab = gCon.gameSettings.continueButton;
        continueButton       = Instantiate(continueButtonPrefab, Vector3.zero, Quaternion.identity) as GameObject;
        continueButton.transform.SetParent(gCon.dialogueHolder.transform);
        continueButton.GetComponent <RectTransform> ().localPosition = continueButtonPrefab.transform.position;
        continueButton.GetComponent <RectTransform> ().localScale    = Vector3.one;
        continueButton.SetActive(false);
        continueButton.GetComponent <Button> ().onClick.AddListener(() => Dialoguer.ContinueDialogue());

        //endButton init
        endButtonPrefab = gCon.gameSettings.endButton;
        endButton       = Instantiate(endButtonPrefab, Vector3.zero, Quaternion.identity) as GameObject;
        endButton.transform.SetParent(gCon.dialogueHolder.transform);
        endButton.GetComponent <RectTransform> ().localPosition = endButtonPrefab.transform.position;
        endButton.GetComponent <RectTransform> ().localScale    = Vector3.one;
        endButton.SetActive(false);
        endButton.GetComponent <Button> ().onClick.AddListener(() => Dialoguer.EndDialogue());


        Dialoguer.events.onStarted   += OnStarted;
        Dialoguer.events.onEnded     += OnEnded;
        Dialoguer.events.onTextPhase += OnTextPhase;
    }
Exemple #11
0
 void Awake()
 {
     Dialoguer.Initialize();
 }
 void Awake()
 {
     // You must initialize Dialoguer before using it!
     // This only needs to happen once, and should happen when your game is loaded
     Dialoguer.Initialize();
 }
Exemple #13
0
 void Start()
 {
     Dialoguer.Initialize();
 }
Exemple #14
0
 void Awake()
 {
     Dialoguer.Initialize();
     Dialoguer.events.onMessageEvent += messageEvent;
     Dialoguer.events.onEnded        += endDialogue;
 }
Exemple #15
0
 void Awake()
 {
     Dialoguer.Initialize();
     DontDestroyOnLoad(transform.gameObject);
 }
Exemple #16
0
 // Use this for initialization
 void Start()
 {
     Dialoguer.Initialize();
     Messenger.AddListener <int> ("announcement", handleAnnouncement);
 }
Exemple #17
0
 protected void Start()
 {
     Transport(Floor, PlayerPos);
     Dialoguer.Initialize();
     DialoguerSkin.addDialoguerEvents();
 }
Exemple #18
0
 private void Awake()
 {
     initComponent();
     Dialoguer.Initialize();
 }
Exemple #19
0
 void Awake()
 {
     // You must initialize Dialoguer before using it!
     Dialoguer.Initialize();
 }
 void Awake()
 {
     collidingWith  = new List <GameObject>();
     triggeringWith = new List <GameObject>();
     Dialoguer.Initialize();
 }