// Start is called before the first frame update
 void Start()
 {
     anim     = GetComponent <Animator>();
     agent    = GetComponent <NavMeshAgent>();
     Sleeping = false;
     Sleep    = false;
     DTScript = GameObject.Find("TimeController").GetComponent <Day_TimeScript>();
 }
    // Use this for initialization
    void Start()
    {
        rb                     = GetComponent <Rigidbody>();
        t                      = GetComponent <Transform>();
        GameMode               = 0;
        CanGoToComputer        = false;
        CanGoToKitchen         = false;
        CanGetTaskList         = false;
        CanGoToTV              = false;
        CanGiveInput           = false;
        CanGoToSleep           = false;
        GotTasksToday          = false;
        CanKillEnemy           = false;
        CorrectEnemy           = false;
        PuzzlePieceDirection   = 1;
        camswitch              = GameObject.FindGameObjectWithTag("GameController").GetComponent <CameraSwitch>();
        PuzzlePiece            = GameObject.FindGameObjectWithTag("ComputerStartTag");
        Bar                    = GameObject.FindGameObjectWithTag("Bar");
        Cube                   = GameObject.FindGameObjectWithTag("puzzle4");
        Trap1                  = GameObject.FindGameObjectWithTag("Trap1");
        Trap2                  = GameObject.FindGameObjectWithTag("Trap2");
        Trap3                  = GameObject.FindGameObjectWithTag("Trap3");
        dt                     = GameObject.Find("TimeController").GetComponent <Day_TimeScript>();
        SpawnLocation          = new Vector3(PuzzlePiece.transform.position.x, PuzzlePiece.transform.position.y, PuzzlePiece.transform.position.z);
        LevelCommands          = new List <string>();
        TaskList               = new List <string>();
        SecuritySystemArr      = new List <int>();
        ComputerPuzzleAttempts = 1;

        CanLookAtSchedule = false;

        canvasText     = canvas.GetComponentInChildren <TMPro.TextMeshProUGUI>();
        kitchenText    = KitchenC.GetComponentInChildren <TMPro.TextMeshProUGUI>();
        TutorialValue  = 0;
        StartOfGame    = 1;
        StartOfKitchen = 0;
        StartOfComp    = 0;
        StartOfPuzzT   = 0;
        StartOfRadio   = 0;

        kitchenText.SetText("");
        puzzThreeText.SetText("");
    }
예제 #3
0
 // Start is called before the first frame update
 void Start()
 {
     DT       = GameObject.Find("TimeController").GetComponent <Day_TimeScript>();
     SM       = GameObject.Find("Player").GetComponent <SimpleMovement>();
     TaskList = SM.TaskList;
 }