예제 #1
0
    //Lockdown Timer Variables
    //private float runTimer;
    //private bool timerActive;
    //private bool switchedRooms;

    public void Initialize()
    {
        controllerInput = FindObjectOfType <ControllerInputSystem>().GetComponent <ControllerInputSystem>();
        levelGenerator  = GetComponent <LevelGeneration>();
        roomManager     = GetComponent <RoomManager>();
        cameraFollow    = GameObject.Find("Main Camera").GetComponent <CameraSmoothFollow>();
        minimapCamera   = FindObjectOfType <MinimapCamera>();
        audienceManager = FindObjectOfType <AudienceInteractable>().GetComponent <AudienceInteractableManager>();

        websiteData = new WebsiteScript(connectWebsite);
        StartCoroutine(websiteData.LockFaction(2, 0, ""));
        screenUI = FindObjectOfType <ScreenUISystem>().GetComponent <ScreenUISystem>();

        enemyManager = new EnemyManager();



        // Setup level layout
        levelGenerator.CreateLayout();
        roomManager.SpawnLayout(levelGenerator.GetGridSpaces(), levelGenerator.GetSecureRoomNum());

        audienceManager.InitializeInteractables();

        player = FindObjectOfType <PlayerController>();

        timer = 0;

        // Game Variables
        moneyCollected = 0;

        //runTimer = 600;

        //switchedRooms = false;
    }
예제 #2
0
    private void Start()
    {
        // Set up private members
        gameRun         = FindObjectOfType <GameRun>();
        controllerInput = GetComponent <ControllerInputSystem>();
        screenUI        = FindObjectOfType <ScreenUISystem>().GetComponent <ScreenUISystem>();

        // Create new Run
        gameRun.Initialize();
    }