void Start()
    {
        // Initializers
        dMan        = FindObjectOfType <DialogueManager>();
        mainCamera  = FindObjectOfType <CameraFollow>();
        moveOptsArw = FindObjectOfType <MoveOptionsMenuArrow>();
        o1Arw       = GameObject.Find("Opt1Arw").GetComponent <Image>();
        o2Arw       = GameObject.Find("Opt2Arw").GetComponent <Image>();
        o3Arw       = GameObject.Find("Opt3Arw").GetComponent <Image>();
        o4Arw       = GameObject.Find("Opt4Arw").GetComponent <Image>();
        o1Text      = GameObject.Find("Opt1").GetComponent <Image>();
        o2Text      = GameObject.Find("Opt2").GetComponent <Image>();
        o3Text      = GameObject.Find("Opt3").GetComponent <Image>();
        o4Text      = GameObject.Find("Opt4").GetComponent <Image>();
        oFrame      = GameObject.Find("Options_Frame").GetComponent <Image>();
        oBox        = GameObject.Find("Options_Box");
        uMan        = FindObjectOfType <UIManager>();

        // DC TODO -- Default is false?
        bDiaToOpts     = false;
        bOptionsActive = false;
        bPauseOptions  = false; // UX -- Might be needed to prevent options selection
        pauseTime      = 0.5f;

        o1ArwPoints  = new float[4];
        o1TextPoints = new float[4];
        o2ArwPoints  = new float[4];
        o2TextPoints = new float[4];
        o3ArwPoints  = new float[4];
        o3TextPoints = new float[4];
        o4ArwPoints  = new float[4];
        o4TextPoints = new float[4];
        oFramePoints = new float[4];

        ConfigureParameters();
    }
Example #2
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;
    }