Esempio n. 1
0
 private void Awake()
 {
     roomNavigation                = GetComponent <RoomNavigation>();
     interactableItems             = GetComponent <interactableItems>();
     interactionDescriptionsInRoom = new List <string>();
     actionLog = new List <string>();
 }
Esempio n. 2
0
 // Use this for initialization
 void Awake()
 {
     interactableItems = GetComponent <InteractableItems> ();
     roomNavigation    = GetComponent <RoomNavigation>();
     puzzleManager     = GetComponent <PuzzleManager> ();
     soundEffects      = GetComponents <AudioSource>();
 }
Esempio n. 3
0
 void Awake()
 {
     interactableItems = GetComponent <InteractableItems>();
     roomNavigation    = GetComponent <RoomNavigation>();
     _source           = GetComponent <AudioSource>();
     textTyper         = FindObjectOfType <TextTyper>();
 }
 void Awake()
 {
     //GameObject.DontDestroyOnLoad(gameObject);
     /*When the game starts it populates the items and rooms*/
     interactableItems = GetComponent <InteractableItems>();
     roomNavigation    = GetComponent <RoomNavigation>();
 }
Esempio n. 5
0
 void Awake()
 {
     controller     = GetComponent <GameController>();
     roomNavigation = GetComponent <RoomNavigation>();
     powerOn        = false;
     teleporterOn   = false;
 }
Esempio n. 6
0
 // Use this for initialization
 void Awake()
 {
     navigation        = GetComponent <RoomNavigation> ();
     interactableItems = GetComponent <InteractableItems> ();
     map = FindObjectOfType <Map> ();
     displayText.color = baseColor;
 }
Esempio n. 7
0
 // Start is called before the first frame update
 void Awake()
 {
     interactableItems = GetComponent <InteractableItems>();
     //get the RoomNavigation componenet
     roomNavigation = GetComponent <RoomNavigation>();
     audioSource    = GetComponent <AudioSource>();
 }
Esempio n. 8
0
 // Use this for initialization
 void Awake()
 {
     roomNavigation    = GetComponent <RoomNavigation>();
     interactableItems = GetComponent <InteractableItems>();
     saveLoadGame      = GetComponent <SaveLoadGame>();
     Cursor.lockState  = CursorLockMode.Locked;
     Score             = Moves = 0;
 }
Esempio n. 9
0
 public static void SetRoomNavigaton(RoomNavigation _ar)
 {
     if (_rn != null || _ar == null)
     {
         Debug.Log("RN assigned or geted to empty object");
         return;
     }
     _rn = _ar;
 }
Esempio n. 10
0
    void Awake()
    {
        controller     = GetComponent <GameController>();
        roomNavigation = GetComponent <RoomNavigation>();

        hackingTrack = FMODUnity.RuntimeManager.CreateInstance("event:/Music/Hacking_theme");
        hackingTrack.getParameter("Hacking_progress", out hackingIntensity);
        hackingTrack.start();
        hackingTrack.setVolume(0);
    }
Esempio n. 11
0
 //---------------------------------------------
 void Awake()
 {
     interactableItems = GetComponent <InteractableItems> ();
     textInput         = GetComponent <TextInput>();
     actionResponse    = GetComponent <ActionResponse>();
     roomNavigation    = GetComponent <RoomNavigation> ();
     spriteDisplay     = Instantiate(renderer);//, new Vector3(0,0,0),Quaternion.identity);
     display           = spriteDisplay.GetComponent <SpriteRenderer> ();
     //controlObject = GetInstanceID();
     //Debug.Log(controlObject);
 }
Esempio n. 12
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(gameObject);
        }

        interactableItems = GetComponent <InteractableItems> ();
        roomNavigation    = GetComponent <RoomNavigation> ();

        for (int i = 0; i < resetRemoveItemsAtStartOfGameToBeFalse.Count; i++)
        {
            resetRemoveItemsAtStartOfGameToBeFalse[i].removeItem = false;
            for (int j = 0; j < resetRemoveItemsAtStartOfGameToBeFalse[i].interactions.Length; j++)
            {
                resetRemoveItemsAtStartOfGameToBeFalse[i].interactions[j].currentTextResponse = resetRemoveItemsAtStartOfGameToBeFalse[i].interactions[j].originalTextResponse;
            }
        }

        for (int i = 0; i < resetRemoveItemsAtStartOfGameToBeTrue.Count; i++)
        {
            resetRemoveItemsAtStartOfGameToBeTrue[i].removeItem = true;
            for (int j = 0; j < resetRemoveItemsAtStartOfGameToBeTrue[i].interactions.Length; j++)
            {
                resetRemoveItemsAtStartOfGameToBeTrue[i].interactions[j].currentTextResponse = resetRemoveItemsAtStartOfGameToBeTrue[i].interactions[j].originalTextResponse;
            }
        }

        for (int i = 0; i < resetDefaultRoomDescriptions.Count; i++)
        {
            resetDefaultRoomDescriptions [i].description = resetDefaultRoomDescriptions [i].originalDescription;
        }
    }
Esempio n. 13
0
    void Awake()
    {
        //Get a bunch of components attached to this game object
        roomNavigation    = GetComponent <RoomNavigation>();
        interactableItems = GetComponent <InteractableItems>();
        uiFader           = GetComponent <UIFader>();
        dialogueManager   = GetComponent <DialogueManager>();
        textAnimator      = GetComponent <AnimatedDialogueText>();
        canvas            = GameObject.Find("Canvas").GetComponent <Canvas>();
        canvasRekt        = canvas.GetComponent <RectTransform>();
        canvasWidth       = canvas.GetComponent <RectTransform>().rect.width *canvas.GetComponent <RectTransform>().localScale.x;
        textInput         = GetComponent <TextInput>();

        tipBox = GameObject.Find("Tipbox");
        tipBoxRectTransform = GameObject.Find("ToolTipText").GetComponent <RectTransform>();

        //Set default display to currently being used (as opposed to hacking)
        currentDisplayText = defaultDisplayText;
        currentActionLog   = textModeActionLog;

        //Clear the the displays of their default text
        defaultDisplayText.text = " ";
        hackingDisplayText.text = " ";
    }
Esempio n. 14
0
 private void Awake()
 {
     controller      = GetComponent <GameController>();
     _roomNavigation = GetComponent <RoomNavigation>();
     InputField.onEndEdit.AddListener(AcceptStringInput);
 }
Esempio n. 15
0
    // Start is called before the first frame update
    void Awake()
    {
        roomNavigation = GetComponent <RoomNavigation>();

        dungeonType = Random.Range(1, 10);
        rooms       = Random.Range(4, 30);
        switch (dungeonType)
        {
        case 1:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\deathTrap.txt");
            break;

        case 2:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\lair.txt");
            break;

        case 3:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\maze.txt");
            break;

        case 4:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\mine.txt");
            break;

        case 5:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\planarGate.txt");
            break;

        case 6:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\stronghold.txt");
            break;

        case 7:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\templeShrine.txt");
            break;

        case 8:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\tomb.txt");
            break;

        case 9:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\treasureVault.txt");
            break;

        case 10:
            furnishings = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\furnishings\general.txt");
            break;
        }
        beyondDoor   = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\beyondDoor.txt");
        chambers     = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\chambers.txt");
        doors        = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\doors.txt");
        exitLocation = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\exitLocation.txt");
        exitType     = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\exitType.txt");
        passages     = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\passages.txt");
        startingArea = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\startingArea.txt");
        chamberState = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\chamberState.txt");
        cEL          = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\chamberExitsLarge.txt");
        cES          = System.IO.File.ReadAllLines(@"C:\Users\wilso\OneDrive\Documents\GitHub\g370p2\g370p3\Assets\TXTFiles\DungeonStuff\chamberExitsSmall.txt");

        int[] chamberExitsLarge = new int[cEL.Length], chamberExitsSmall = new int[cES.Length];

        for (int i = 0; i < cEL.Length; i++)
        {
            chamberExitsLarge[i] = System.Convert.ToInt32(cEL[i]);
        }

        for (int i = 0; i < cES.Length; i++)
        {
            chamberExitsSmall[i] = System.Convert.ToInt32(cES[i]);
        }

        CreateRooms();
    }
Esempio n. 16
0
 // Use this for initialization
 void Awake()
 {
     interactableItems = GetComponent <InteractableItems>();
     roomNavigation    = GetComponent <RoomNavigation>();
     player.GetComponent <Player>();
 }
Esempio n. 17
0
 // Use this for initialization
 void Awake()
 {
     roomNavigation = GetComponent <RoomNavigation> ();
 }
 private void Start()
 {
     _controller = GetComponent <TxtAdvController>();
     _roomNav    = GetComponent <RoomNavigation>();
 }
Esempio n. 19
0
 public void Awake()
 {
     controller     = GetComponent <GameController>();
     roomNavigation = GetComponent <RoomNavigation>();
 }
Esempio n. 20
0
 // Unity functions
 private void Awake()
 {
     // Reference to the room navigation
     roomNavigation    = GetComponent <RoomNavigation>();
     interactableItems = GetComponent <InteractableItems>();
 }
Esempio n. 21
0
 // Start is called before the first frame update
 void Awake()
 {
     roomNavigation    = GetComponent <RoomNavigation>();
     textInput         = GetComponent <TextInput>();
     interactableItems = GetComponent <InteractableItems>();
     registerObjects   = GetComponent <RegisterObjects>();
     registerRooms     = GetComponent <RegisterRooms>();
     map                  = GetComponent <MiniMap>();
     debugClass           = GetComponent <DebugMode>();
     additionalNarrations = GetComponent <AdditionalNarrations>();
     npcTalk              = GetComponent <NPCTalk>();
     npcInteraction       = GetComponent <NPCInteraction>();
     demoScript           = GetComponent <DemoScript>();
     achievements         = GetComponent <Achievements>();
     combat               = GetComponent <Combat>();
     teleType             = GetComponent <TeleType>();
     introScreen          = GetComponent <IntroScreen>();
     GameObject.Find("MainScrollRect").GetComponent <ScrollRect>().verticalNormalizedPosition = 0.5f;
     //enterToContinue = false;
     //escToContinue = false;
     //toResumeEscToContinue = false;
     //exitPopUp = false;
     debugMode              = false;
     secondQuestActive      = false;
     currentActiveInput     = "main";
     ego.equippedWeapon     = null;
     ego.equippedArmor      = null;
     ego.equippedShield     = null;
     ego.chosenAction       = "";
     ego.allStats[0].value  = 100;
     ego.allStats[1].value  = 100;
     ego.allStats[2].value  = 100;
     ego.allStats[3].value  = 0;
     ego.allStats[4].value  = 1;
     ego.allStats[5].value  = 0;
     ego.allStats[6].value  = 4;
     ego.allStats[7].value  = 0;
     ego.allStats[8].value  = 1.5f;
     ego.allStats[9].value  = 0;
     ego.allStats[10].value = 0;
     for (int i = 0; i < ego.allStats.Length; i++)
     {
         ego.allStats[i].effectValue = 0;
     }
     ego.activeEffects.Clear();
     ego.defeatedBadGuys.Clear();
     ego.blueCrystals   = 0;
     ego.bankedCrystals = 0;
     ego.fightClubRank  = 0;
     ego.fleeLocation   = "";
     ego.conversation   = 0;
     ego.currentInit    = 0;
     ego.displayAction  = "";
     ego.chosenAction   = "";
     ego.chosenItem     = null;
     ego.chosenItem2    = null;
     ego.chosenTarget   = null;
     ego.potionBelt.Clear();
     //enterToContinueDialogue = false;
     //timeDelay = 1;
     sentences = new Queue <string>();
     pauses    = new Queue <int>();
     //ego = Instantiate(ego);
 }
Esempio n. 22
0
    List <string> actionLog = new List <string>();                                                                    // creates action log string

    void Awake()
    {
        interactableItems = GetComponent <InteractableItems>();                                                     // fetches InteractableItems script
        roomNavigation    = GetComponent <RoomNavigation>();                                                        // fetches RoomNavigation script
    }
    List <string> actionLog = new List <string>();                                                                    // creates action log string

    void Awake()
    {
        interactableItems = GetComponent <InteractableItems>();
        roomNavigation    = GetComponent <RoomNavigation>();                                                        // gets RoomNavigation script
    }
Esempio n. 24
0
 // Use this for initialization
 void Awake()
 {
     roomNavigation    = GetComponent <RoomNavigation> ();
     interactableItems = GetComponent <InteractableItems> ();
 }
Esempio n. 25
0
 // Use this for initialization
 void Awake()
 {
     roomNavigation = GetComponent <RoomNavigation>();
     connectioner   = GetComponent <DBConnectioner>();
     connectioner.ConnectToDB();
 }