void Start()
    {
        rb                     = GetComponent <Rigidbody2D>();
        sprite                 = transform.GetChild(0).GetComponent <SpriteRenderer>();
        anim                   = transform.GetChild(0).GetComponent <Animator>();
        inventory              = GetComponent <PlayerInventory>();
        nightCycle             = GameObject.Find("Global Light (Sun)").GetComponent <DayNightCycleManager>();
        playerSoundManager     = GetComponent <PlayerSoundManager>();
        cameraHandler          = GameObject.Find("Camera Manager").GetComponent <CameraHandler>();
        transitionHandler      = GameObject.Find("Transition Handler").GetComponent <TransitionHandler>();
        interactionsManager    = GetComponent <InteractionsManager>();
        individualInteractions = GameObject.Find("Interactions Manager").GetComponent <IndividualInteractions>();
        playerCollider         = GetComponent <BoxCollider2D>();
        gm                     = GameObject.Find("Game Manager").GetComponent <GameManager>();
        pickUpTarget           = canoe.transform.GetChild(0).GetChild(0);

        montyObj            = GameObject.Find("Monty");
        montyStateActions   = montyObj.GetComponent <MontyStateActions>();
        montyStateManager   = montyObj.GetComponent <MontyStateManager>();
        montyStateVariables = montyObj.GetComponent <MontyStateVariables>();

        firstPet = false;
        //canoe = GameObject.Find("Canoe");
        //canoeTarget = GameObject.Find("canoeTarget");

        xSpeed         = defaultXSpeed;
        ySpeed         = defaultYSpeed;
        canoeWalkSpeed = defaultCanoeWalkSpeed;
    }
Exemple #2
0
 private void Awake()
 {
     playerController = player.GetComponent <PlayerController>();
     paddleScript     = canoeAIO.GetComponent <CanoePaddle>();
     cameraHandler    = GameObject.Find("Camera Manager").GetComponent <CameraHandler>();
     gm = GameObject.Find("Game Manager").GetComponent <GameManager>();
     montyStateVariables = monty.GetComponent <MontyStateVariables>();
     montyStateManager   = monty.GetComponent <MontyStateManager>();
     montyStateActions   = monty.GetComponent <MontyStateActions>();
 }
Exemple #3
0
 private void Start()
 {
     stateActions   = GetComponent <MontyStateActions>();
     stateVariables = GetComponent <MontyStateVariables>();
     inFetch        = false;
 }