예제 #1
0
 public void destroy()
 {
     /*
      * Break the design pattern, because of the scene change ... sorry
      */
     manager = null;
 }
예제 #2
0
 void Start()
 {
     manager = DialogueManager.LoadDialogueFile(dialogueFile);
     currentDialogue = manager.GetDialogue("TutorialStart");
     currentChoice = currentDialogue.GetChoices()[0];
     currentDialogue.PickChoice(currentChoice);
 }
 void Start()
 {
     im = GlobalVars.interact_mode;
     rm = GlobalVars.room_manager;
     dia = GlobalVars.description_ui;
     dm = GlobalVars.dialogue_manager;
 }
    // Use this for initialization
    void Start()
    {
        _dlgBox = FindObjectOfType<DialogueManager>();

        childInteractionDialogue = LoadInteractionScript(scriptCharacterPrefix + "ChildScript");
        adultInteractionDialogue =  LoadInteractionScript(scriptCharacterPrefix + "AdultScript");
        elderlyInteractionDialogue =  LoadInteractionScript(scriptCharacterPrefix + "ElderlyScript");
    }
예제 #5
0
 void Awake()
 {
     if (Instance == null) {
         Instance = this;
     } else {
         Destroy(gameObject);
     }
 }
예제 #6
0
    // Use this for initialization
    void Start()
    {
        health = maxHealth;
        controller = GetComponent<Controller2D>();
        anim = this.GetComponent<Animator>();

        dialougeManager = GameObject.Find("Dialouge Panel").GetComponent<DialogueManager>();
    }
 void Awake()
 {
     mCountdown = FindObjectOfType<Countdown> ();
     mRecordingPlayer = FindObjectOfType<RecordingPlayer> ();
     mDialogueManager = FindObjectOfType<DialogueManager> ();
     mNetworkManager = FindObjectOfType<NetworkManager> ();
     mScreen = GameObject.FindGameObjectWithTag ("Screen");
     mViewerChart = FindObjectOfType<ViewerChart> ();
 }
    // Use this for initialization
    void Start ()
    {
        _player = GameObject.FindGameObjectWithTag("Player");
        _dialogueManager = FindObjectOfType<DialogueManager>();

        if (inventoryManager.GetComponent<InventorySystemManager>())
        {
            _inventoryLibary = inventoryManager.GetComponent<InventorySystemManager>();//assigns the InventorySystemManager script assigned on the inventoryManager gameObject 
            
        }
    }
예제 #9
0
	// Use this for initialization
	void Start () {
        if (instance != null)
        {
            Destroy(gameObject);
        }
        else
        {
            instance = this;
        }

        bulle.SetActive(false);
	}
예제 #10
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     audioSource = gameObject.AddComponent<AudioSource>();
 }
예제 #11
0
    public static DialogueManager getDialogueManager()
    {
        /*
         * Part of the Singleton design pattern. Return the only instance of the manager.
         * Create one if needed.
         */

        if(manager == null){
            manager = new DialogueManager();
        }

        return manager;
    }
예제 #12
0
    void Start()
    {
        dm = GlobalVars.dialogue_manager;

        isVisible = false;

        int[] BoxSize = new int[2]{Screen.width / 5, Screen.width / 14};
        BoxRect = new Rect(Screen.width / 2 - BoxSize[0] / 2, Screen.height / 2 - BoxSize[1] / 2, BoxSize[0], BoxSize[1]);

        int[] LabelSize = new int[2]{Screen.width / 8, Screen.width / 32};
        LabelRect = new Rect(Screen.width / 2 - LabelSize[0] / 2, Screen.height / 2 - LabelSize[1] / 2 - BoxSize[1] / 3, LabelSize[0], LabelSize[1]);

        int[] ButtonSize = new int[2]{Screen.width / 16, Screen.width / 64};
        ButtonRect = new Rect(Screen.width / 2 - ButtonSize[0] / 2, Screen.height / 2 - ButtonSize[1] / 2 + BoxSize[1] / 3, ButtonSize[0], ButtonSize[1]);
    }
    public void Start()
    {
        im = GlobalVars.interact_mode;

        dm = GlobalVars.dialogue_manager;

        cui = GlobalVars.cursor_ui;

        dui = GlobalVars.description_ui;
        aui = GlobalVars.action_text_ui;

        if(GlobalVars.database == null || dm == null || im == null || GlobalVars.database == null)
            this.enabled = false; // dont run script if we are missing dependacies
        else
            myData = GlobalVars.database.GetCharacter(CharacterId);

        MouseOver = false;
    }
예제 #14
0
    public virtual int Add(ItemBase pItem, uint pAmount, bool pDropLeftOvers = false)
    {
        if (IsSellChest == false && pItem.Name == "Coin")
        {
            return(0);
        }
        int amountToAdd = (int)pAmount;

        //don't add more than weight allows

        if (pItem.Weight > 0)
        {
            amountToAdd = Mathf.FloorToInt((MaxWeight - CurrentWeight) / pItem.Weight);
        }

        //don't add more than requested
        amountToAdd = (int)Mathf.Clamp(amountToAdd, 0f, pAmount);


        //        print("Can add amount if stacks allow: " + amountToAdd);
        // If weight cannot be added, return false
        if (amountToAdd < 1)
        {
            DialogueManager.ShowAlert("Inventory can't contain 1.");
            return(0);
        }
        int amountLeft  = amountToAdd;
        int amountAdded = 0;

        //Check for an existing stack
        InventoryItemStack existingStack = FindItemStack(pItem.ID);


        //if there exists a stack, add as much to it as possible
        if (existingStack != null)
        {
            //            print("existing stack");
            int maxAmt = MaxStackAmount - existingStack.Amount;
            amountAdded = Mathf.Clamp(amountToAdd, 0, maxAmt);
            existingStack.Add(amountAdded);
            amountLeft -= amountAdded;
        }

        //if there are still items to add, determine how many stacks are needed, then create as many as possible, while adding as much as possible to them until there are no more items.
        //If the stack space runs out, return the amount added.

        if (amountLeft > 0)
        {
            //            print("amount left: " + amountToAdd);
            int stacksLeft     = MaxStacks - ContainedStacks.Count;
            int requiredStacks = Mathf.CeilToInt((float)amountLeft / (float)MaxStackAmount);
            //   print("required stacks: " + requiredStacks);
            //
            //            print("free stacks: " + stacksLeft);

            if (requiredStacks > stacksLeft)
            {
                requiredStacks = stacksLeft;
            }
            for (int i = 0; i < requiredStacks; i++)
            {
                InventoryItemStack newItemStack = new InventoryItemStack();
                newItemStack.ContainedItem = pItem.Clone(pItem);
                int newAmt = Mathf.Clamp(amountLeft, 0, MaxStackAmount);
                newItemStack.Amount = newAmt;
                amountAdded        += newAmt;
                ContainedStacks.Add(newItemStack);
                amountLeft -= newAmt;
            }
        }
        if (OnItemChanged != null)
        {
            OnItemChanged();
        }

        if (OnAddItem != null)
        {
            OnAddItem(this);
        }
        CurrentWeight += pItem.Weight * amountAdded;

        if (pDropLeftOvers)
        {
            DropLeftOvers(pItem, amountLeft);
        }
        return(amountAdded);
    }
    // Use this for initialization
    void Start()
    {
        _sprRender = GetComponent<SpriteRenderer>();

        _dlgBox = FindObjectOfType<DialogueManager>();
    }
 // Use this for initialization
 void Start()
 {
     _dlgBox = FindObjectOfType<DialogueManager>();
 }
예제 #17
0
 void Awake()
 {
     Instance = this;
 }
예제 #18
0
    void Start()
    {
        // Initializers
        aUtil         = FindObjectOfType <AspectUtility>();
        camFollow     = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraFollow>();
        chars         = GetComponent <Characters>();
        dArrow        = GameObject.Find("Dialogue_Arrow").GetComponent <ImageStrobe>();
        dBox          = GameObject.Find("Dialogue_Box");
        dMan          = FindObjectOfType <DialogueManager>();
        dPic          = GameObject.Find("Dialogue_Picture").GetComponent <Image>();
        dText         = GameObject.Find("Dialogue_Text").GetComponent <Text>();
        HUD           = GameObject.Find("HUD");
        mainCamera    = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>();
        mMan          = FindObjectOfType <MusicManager>();
        moveOptsArw   = FindObjectOfType <MoveOptionsMenuArrow>();
        muellerCards  = GameObject.Find("Mueller Cards");
        oBox          = GameObject.Find("Options_Box");
        oMan          = FindObjectOfType <OptionsManager>();
        pause         = FindObjectOfType <PauseGame>();
        pauseBtn      = GameObject.Find("Pause_Button");
        pauseScreen   = GameObject.FindGameObjectWithTag("Pause");
        playerCard    = GameObject.Find("Player_Character_Card");
        save          = FindObjectOfType <SaveGame>();
        sFaderAnim    = GameObject.Find("Screen_Fader");
        sFaderAnimDia = GameObject.Find("Screen_Fader_Dialogue");
        SFXMan        = FindObjectOfType <SFXManager>();
        spLogic       = FindObjectOfType <SinglePlayerLogic>();
        thePlayer     = GameObject.FindGameObjectWithTag("Player");
        touches       = FindObjectOfType <TouchControls>();
        trumpCards    = GameObject.Find("Trump Cards");
        uMan          = FindObjectOfType <UIManager>();

        charTiles = new CharacterTile[24];

        guessThreshold = 1.25f;
        musicTimer1    = 5.39f;
        musicTimer2    = 1.05f;
        strobeTimer    = 1.0f;

        // Trump Dialogue
        //dialogueLines = new string[] {
        //        "There was no collusion. Everybody knows there was no collusion.",
        //        "The Fake News, the Disgusting Democrats, and the Deep State would say different."
        //    };

        // Initial prompt to pick a mode
        dMan.bDialogueActive = false;
        mMan.bMusicCanPlay   = false;

        GWC_PromptRestrictions();

        // First Time w/ App, set to "Factory Settings"
        if (PlayerPrefs.GetInt("GivenDirectionsForGWC") == 0)
        {
            save.DeleteAllPrefs();

            dialogueLines = new string[] {
                "I want YOU.. to         Guess Who Colluded.",
                "Like classic Guess Who, you'll be flipping tiles and guessing people.",
                "Tap or click options when they appear below this text box.",
                "Tap or click tiles to keep track of who your opponent is.",
                "If you have trouble, click the menu icon in the top right.",
                "It'll show you your character card, let you change settings, etc.",
                "GLHF!"
            };

            // Avoid "Factory Settings"
            PlayerPrefs.SetInt("GivenDirectionsForGWC", 1);
        }
        else
        {
            dialogueLines = new string[] {
                "I want YOU.. to         Guess Who Colluded."
            };
        }

        dMan.dialogueLines        = dialogueLines;
        dMan.currentLine          = 0;
        dText.text                = dialogueLines[dMan.currentLine];
        dPic.sprite               = portPic[48];
        dBox.transform.localScale = Vector3.one;
        sFaderAnimDia.GetComponent <Animator>().enabled = true;

        thePlayer.GetComponent <PlayerMovement>().bStopPlayerMovement = true;
    }
예제 #19
0
 // Start is called before the first frame update
 void Start()
 {
     dialogueManager = FindObjectOfType <DialogueManager>();
     canInteract     = true;
 }
예제 #20
0
    /// <summary>
    /// Run python code using IronPython.
    /// TODO: try/catch ??
    /// </summary>
    /// <param name="code"></param>
    private void RunPythonCode(string code)
    {
        // Create engine and scope.
        ScriptEngine engine = Python.CreateEngine();
        ScriptScope  scope  = engine.CreateScope();

        // Add source code to engine.
        ScriptSource sourceCode = engine.CreateScriptSourceFromString(code);

        // Create streams for output and errors.
        MemoryStream streamOutput = new MemoryStream();
        MemoryStream streamError  = new MemoryStream();

        // Set default encoding to both streams.
        engine.Runtime.IO.SetOutput(streamOutput, Encoding.Default);
        engine.Runtime.IO.SetErrorOutput(streamError, Encoding.Default);

        // Handle any exception when executing code.
        string exception = "";

        try
        {
            // Execute code within scope.
            string executionResult = sourceCode.Execute <string>(scope);
        }
        catch (Exception ex)
        {
            // Most errors will come out as exception instead of through error stream.
            exception = ex.Message;
            Debug.Log("Exception:  " + exception);
        }

        // Get output and errors from stream.
        string output = Encoding.Default.GetString(streamOutput.ToArray());

        Debug.Log("Captured output: " + output);
        string errors = Encoding.Default.GetString(streamError.ToArray());

        Debug.Log("Captured error: " + errors);

        // Show player the results.
        string totalOutput = output + errors + exception;

        outputText.text = OUTPUT_PREFIX + totalOutput;

        // TODO cache in variable as optimization?
        TutorialManager tutorialManager = FindObjectOfType <TutorialManager>();
        DialogueManager dialogueManager = FindObjectOfType <DialogueManager>();

        if (tutorialManager.currentProblem != null)
        {
            string hint;
            if (tutorialManager.currentProblem.ValidateAnswer(code, totalOutput, out hint))
            {
                dialogueManager.StartSuccessMessage(tutorialManager.currentDialogue);
            }
            else
            {
                dialogueManager.StartHint(hint);
            }
        }
    }
예제 #21
0
 // Use this for initialization
 void Start()
 {
     dMan  = FindObjectOfType <DialogueManager>();
     theGM = FindObjectOfType <GameModel>();
 }
예제 #22
0
        public bool PlayerInteraction(Facing player_direction)
        {
            GlobalState.Dialogue = DialogueManager.GetDialogue("forest_npc", "thorax");

            return(true);
        }
예제 #23
0
 private void Start()
 {
     dialogueSource = FindObjectOfType <DialogueManager>();
 }
예제 #24
0
 public void LoadGameScene(string _levelName)
 {
     DialogueManager.StopConversation();
     SceneManager.LoadSceneAsync(_levelName);
 }
예제 #25
0
 void Awake()
 {
     dialogueManager = FindObjectOfType <DialogueManager>();
 }
예제 #26
0
 void Awake()
 {
     actionWindow = Global.Component.GetActionWindowController();
     dialogWindow = Global.Component.GetDialogueManager();
     //rb = GetComponent<Rigidbody2D>();
 }
예제 #27
0
    public static Dialogue dialogueExcel;//对话表

    void Awake()
    {
        _dialogueManager = this;
        dialogueExcel    = Resources.Load <Dialogue>("Excel/Dialogue");
    }
 void Awake()
 {
     Instance  = this;
     sentences = new Queue <string>();
 }
예제 #29
0
    // Called by the mediator when the player successfully executes an action.
    public void UpdateTutorialState(string playerAction)
    {
        // When the player first talks to the wizard, the talk to action has been completed.
        if (playerAction.Equals("(talk-to arthur mel storage)") &&
            DialogueLua.GetVariable("WIZARD_TUTORIAL_TALK_TO_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_TALK_TO_ACTION_COMPLETED", true);
            DialogueManager.StartConversation("Wizard");
        }

        // This condition happens when the player has picked up the bucket before talking to Mel.
        else if (playerAction.Equals("(pickup arthur basementbucket storage)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_PICK_UP_ACTION_STARTED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_PICK_UP_ACTION_COMPLETED", true);
        }

        // When the player picks up the bucket next to the wizard, the pickup action has been completed.
        else if (playerAction.Equals("(pickup arthur basementbucket storage)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_PICK_UP_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_PICK_UP_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_PICK_UP_ACTION_COMPLETED", true);
            DialogueManager.StartConversation("Wizard");
        }

        // When the player drops the bucket in the world, the drop action has been completed.
        else if (playerAction.Equals("(drop arthur basementbucket storage)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_DROP_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_DROP_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_DROP_ACTION_COMPLETED", true);
            DialogueLua.SetVariable("WIZARD_TUTORIAL_GIVE_ACTION_STARTED", true);

            // At this point we can add that the wizard wants the bucket to the initial state.
            // Create the literal: (wants-item mel basementbucket)
            IPredicate wants_basementbucket = Predicate.BuildPositiveGroundLiteral("wants-item", "mel", "basementbucket");

            // Update the problem.
            mediator.ExpandInitialState(wants_basementbucket);
            DialogueManager.StartConversation("Wizard");
        }

        // When the player gives the bucket to the wizard, the give action has been completed.
        else if (playerAction.Equals("(give arthur basementbucket mel storage)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_GIVE_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_GIVE_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_GIVE_ACTION_COMPLETED", true);
            DialogueManager.StartConversation("Wizard");
        }

        // When the player moves through the doorway toward the basement, the go to action has been completed.
        else if (playerAction.Equals("(move-through-doorway arthur storage basement)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_GOTO_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_GOTO_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_GOTO_ACTION_COMPLETED", true);
            DialogueLua.SetVariable("WIZARD_TUTORIAL_LOOKAT_ACTION_STARTED", true);

            // Now we have to move merlin over to the other room.
            // Swap two literals in the initial state to make that happen:
            // (at mel storage) for (at mel basement)

            IPredicate at_storage  = Predicate.BuildPositiveGroundLiteral("at", "mel", "storage");
            IPredicate at_basement = Predicate.BuildPositiveGroundLiteral("at", "mel", "basement");

            // Update the planning problem,
            mediator.SwapProblemInitialStateLiterals(at_storage, at_basement);

            // Start the wizard dialogue - which should be at the point the player has entered the room.
            DialogueManager.StartConversation("Wizard");
        }

        // When the player looks at the locked entrance, the look at action has been completed.
        else if (playerAction.Equals("(look-at arthur basementexit basement)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_LOOKAT_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_LOOKAT_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_LOOKAT_ACTION_COMPLETED", true);
            DialogueLua.SetVariable("WIZARD_TUTORIAL_USE_ACTION_STARTED", true);
            DialogueManager.StartConversation("Wizard");
        }

        // When the player uses the key on the entrance, the use action has been completed.
        else if (playerAction.Equals("(unlock-entrance arthur basementexitkey basementexit basement)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_USE_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_USE_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_USE_ACTION_COMPLETED", true);
            DialogueLua.SetVariable("WIZARD_TUTORIAL_OPEN_ACTION_STARTED", true);
            DialogueManager.StartConversation("Wizard");
        }

        // When the player opens the entrance, the open action has been completed.
        else if (playerAction.Equals("(open arthur basementexit basement)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_OPEN_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_OPEN_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_OPEN_ACTION_COMPLETED", true);
            DialogueLua.SetVariable("WIZARD_TUTORIAL_GOTOENTRANCE_ACTION_STARTED", true);
            DialogueManager.StartConversation("Wizard");
        }

        // When the player goes to the entrance, the go to action has been completed.
        else if (playerAction.Equals("(move-through-entrance arthur basement basementexit bar)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_GOTOENTRANCE_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_GOTOENTRANCE_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_GOTOENTRANCE_ACTION_COMPLETED", true);


            // Now we have to move merlin over to the bar room.
            // Swap two literals in the initial state to make that happen:
            // (at mel storage) for (at mel basement)

            IPredicate at_storage  = Predicate.BuildPositiveGroundLiteral("at", "mel", "basement");
            IPredicate at_basement = Predicate.BuildPositiveGroundLiteral("at", "mel", "bar");

            // Update the planning problem,
            mediator.SwapProblemInitialStateLiterals(at_storage, at_basement);


            DialogueManager.StartConversation("Wizard");
        }

        // When the player closes the entrance, the close action has been completed.
        else if (playerAction.Equals("(close arthur basemententrance bar)") &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_CLOSE_ACTION_STARTED").AsBool == true &&
                 DialogueLua.GetVariable("WIZARD_TUTORIAL_CLOSE_ACTION_COMPLETED").AsBool == false)
        {
            DialogueLua.SetVariable("WIZARD_TUTORIAL_CLOSE_ACTION_COMPLETED", true);
            DialogueLua.SetVariable("TUTORIAL_FINISHED", true);

            // Here, we need to remove the literal from the goal that was artificially added to disallow the player
            // from leaving the bar.  Create the literal: (at arthur bar)
            IPredicate at_bar = Predicate.BuildPositiveGroundLiteral("at", "arthur", "bar");

            // Update the problem.
            mediator.ContractGoalState(at_bar);

            // Begin game dialogue!
            DialogueManager.StartConversation("Wizard");
        }
    }
예제 #30
0
    void PostYesFunction(int tag)
    {
        if (GameData.Instance.isMusicON != 0)
        {
            SoundManager.instance.PlaySingle(menuClip);
        }

        switch (tag)
        {
        case 0:
            gameLogic = GameController.Instance();
            gameLogic.restartGame();
            break;

        case 10: {
            gameLogic = GameController.Instance();
            if (gameLogic.iStarted)
            {
                if (GameData.Instance.multiRemainingGameCount <= 0)
                {
                    string title   = "Info";
                    string message = "You don't have enough credit to play online game. You can get 5 credits by watching rewarded videos. In addition, You can get more credits by purchasing game packages from the shopping list";
                    dialogueManager = DialogueManager.Instance();
                    dialogueManager.showDialog(title, message, 0);

                    return;
                }
                else
                {
//					MultiplayerController.Instance.SendRematch(true);
                }
            }
        }
        break;

        case 33: {
            // rematch istegi geldi ve kullanici kabul etti..
//			MultiplayerController.Instance.SendAcceptedRematch(true);
        }
        break;

        case 77:
            break;

        case 88:
        {
//				MultiplayerController.Instance.SignInAndStartMPGame (InvitationManager.Instance.Invitation);
        }
        break;

        case 90: {
            Application.Quit();
        }
        break;

        default: {
            gameLogic = GameController.Instance();
            gameLogic.restartGame();
        }
        break;
        }
    }
예제 #31
0
 // Start is called before the first frame update
 void Start()
 {
     theOrder = FindObjectOfType <OrderManager2>();
     theDM    = FindObjectOfType <DialogueManager>();
 }
예제 #32
0
 // Use this for initialization
 void Start()
 {
     inv  = GameObject.Find("Inventory").GetComponent <Inventory>();
     dMan = FindObjectOfType <DialogueManager>();
 }
    public void Start()
    {
        im = GlobalVars.interact_mode;

        dm = GameObject.Find ("Main Camera").GetComponent<DialogueManager>();
    }
예제 #34
0
 // Use this for initialization
 void Start()
 {
     dManager = FindObjectOfType <DialogueManager>();
 }
예제 #35
0
 // Use this for initialization
 void Start()
 {
     dMan = FindObjectOfType <DialogueManager>();
     Debug.Log("dMan was found maybe");
 }
예제 #36
0
 public static void registerDialogueManager(DialogueManager dialogueM)
 {
     dialogueManager = dialogueM;
 }
예제 #37
0
 void Awake()
 {
     rb = GetComponent <Rigidbody2D>();
     dialogueManager = FindObjectOfType <DialogueManager>();
 }
예제 #38
0
 void Start()
 {
     journal  = JournalUI.instance;
     idleUI   = IdleUI.instance;
     dManager = DialogueManager.instance;
 }
 void Awake()
 {
     mNetworkManager = (NetworkManager) FindObjectOfType(typeof(NetworkManager));
     mDialogueManager = (DialogueManager) FindObjectOfType(typeof(DialogueManager));
     mCountdown = (Countdown) FindObjectOfType(typeof(Countdown));
     mAvailablePropsList = (dfListbox) FindObjectOfType(typeof(dfListbox));
     mMyProps = (MyProps) FindObjectOfType(typeof(MyProps));
     mGame = (Game) FindObjectOfType(typeof(Game));
 }
예제 #40
0
 private void Start()
 {
     manager = FindObjectOfType <DialogueManager>();
 }
    void Start()
    {
        dm = gameObject.GetComponent<DialogueManager>();
        db = GlobalVars.database;

        show = false;
        CurrentNode = null;

        TextBox = new Rect(0, Screen.height / 4, Screen.width, Screen.height / 2);
        NextBox = new Rect(0, Screen.height / 4 + 64, 64, 32);
        ChoiceBox = new Rect(0, Screen.height / 4 + 32, 256, 32);
        ChoiceStartY = Screen.height / 4;
    }
    void Awake()
    {
        mNetworkManager = (NetworkManager) FindObjectOfType(typeof(NetworkManager));
        mRecordingPlayer = (RecordingPlayer) FindObjectOfType(typeof(RecordingPlayer));
        mCountdown = (Countdown) FindObjectOfType(typeof(Countdown));
        mScreen = GameObject.FindGameObjectWithTag("Screen");
        mScreenControl = mScreen.GetComponent<dfPanel>();
        mGame = (Game) FindObjectOfType (typeof(Game));
        mDialogueManager = FindObjectOfType<DialogueManager>();

        mDad = GameObject.FindGameObjectWithTag("Dad");
        mMam = GameObject.FindGameObjectWithTag("Mam");
        mSon = GameObject.FindGameObjectWithTag("Son");
        mDaughter = GameObject.FindGameObjectWithTag("Daughter");
        mGrandma = GameObject.FindGameObjectWithTag("Grandma");

        mUIRoot = GameObject.FindGameObjectWithTag("UIRoot");

        mPointGainedIndicatorPrefab = (GameObject)Resources.Load ("Evening/Prefabs/PointGainedIndicator");
    }
예제 #43
0
 /// <summary>
 /// Raised every 10 in game minutes.
 /// </summary>
 /// <param name="sender">Unknown, used by SMAPI.</param>
 /// <param name="e">TimeChanged params.</param>
 /// <remarks>Currently handles: pushing delayed dialogue back onto the stack.</remarks>
 private void OnTimeChanged(object?sender, TimeChangedEventArgs e)
 {
     DialogueManager.PushPossibleDelayedDialogues();
 }
예제 #44
0
 // Use this for initialization
 void Awake()
 {
     Instance = this;
     Dialoguer.Initialize ();
     _choiceButtons = new GameObject[5];
 }
예제 #45
0
 // Use this for initialization
 void StartDialogueTest()
 {
     dm = gameObject.GetComponent<DialogueManager>();
     dm.StartConvo(topic);
 }
예제 #46
0
 void OnDestroy()
 {
     if (Instance == this) {
         Instance = null;
     }
 }
예제 #47
0
 private void Start()
 {
     dM = GameObject.FindGameObjectWithTag("DM").GetComponent <DialogueManager>();
 }
예제 #48
0
 // Start is called before the first frame update
 void Start()
 {
     theDM = FindObjectOfType <DialogueManager>();
 }
예제 #49
0
 public override void OnEnter()
 {
     DialogueManager.UpdateResponses();
     Finish();
 }
예제 #50
0
 protected virtual void Start()
 {
     dialogueManager = FindObjectOfType <DialogueManager>();
 }
예제 #51
0
 // Use this for initialization
 void Start()
 {
     manager = GameObject.Find("DialogueManager").GetComponent <DialogueManager>();
     trigger = gameObject.GetComponent <DialogueTrigger>();
     app.GetComponent <Button>().onClick.AddListener(delegate { NextScreen(); });
 }
예제 #52
0
    /// <summary>
    /// Load a dialogue file by the given DialogueFile reference
    /// </summary>
    /// <param name="file">A reference to a DialogueFile</param>
    /// <returns>A DialogueManager holding the file reference</returns>
    public static DialogueManager LoadDialogueFile(DialogueFile file)
    {
        
        if (managers.ContainsKey(file))
            return managers[file];

        // load file, optimize for searching dialogues
        DialogueManager manager = new DialogueManager();
        managers.Add(file, manager);

        manager.file = file;

        return manager;
    }
예제 #53
0
 private void Awake()
 {
     instance = this;
 }
예제 #54
0
 void Start() {
     dialogueManager = this.GetComponentInParent<DialogueManager>();
 }
예제 #55
0
 // Use this for initialization
 void Start()
 {
     dialogueManager = FindObjectOfType <DialogueManager>();
     catSpawned      = false;
 }
    void Start()
    {
        dm = GlobalVars.dialogue_manager;
        db = GlobalVars.database;

        Type = DialogueNode.NodeType.Unknown;
        DisplayText = new List<string>();

        show = false;

        TextBox = new Rect(Screen.width * 0.1f, (Screen.height * 3) / 4, Screen.width * 0.8f, Screen.height / 6);
        int[] NextBoxSize = {Screen.width / 20, 32};
        NextBox = new Rect(Screen.width / 2 - NextBoxSize[0] / 2, (Screen.height * 3) / 4 + NextBoxSize[0], NextBoxSize[0], NextBoxSize[1]);
        int[] ChoiceBoxSize = {Screen.width / 4, Screen.width / 40};
        ChoiceBox = new Rect(Screen.width / 2 - ChoiceBoxSize[0] / 2, 0, ChoiceBoxSize[0], ChoiceBoxSize[1]);
        ChoiceStartY = (Screen.height * 3) / 4;

        int[] CharacterBoxSize = {Screen.width / 3, Screen.width / 3};
        CharacterBox = new Rect(Screen.width / 2 - CharacterBoxSize[0] / 2, Screen.width / 4 - CharacterBoxSize[1] / 2, CharacterBoxSize[0], CharacterBoxSize[1]);
        //CharacterPositionsX = new int[2]{Screen.width / 4 - CharacterBoxSize[0] / 2, Screen.width - Screen.width / 4 - CharacterBoxSize[0] / 2};

        CharacterSprite = null;
    }
 void Awake()
 {
     mNetworkManager = FindObjectOfType<NetworkManager>();
     mDialogueManager = FindObjectOfType<DialogueManager>();
     mQuestionPanel = FindObjectOfType<QuestionPanel>();
     mManager = FindObjectOfType<Manager>();
 }