Esempio n. 1
0
    // Start is called before the first frame update
    void Start()
    {
        islandScript = GameObject.Find("Air Island").GetComponent <IslandBehaviour>();

        elementUI        = GetComponent <Image>();
        elementUI.sprite = empty;
    }
Esempio n. 2
0
    //public Button button;
    // public Sprite able;
    // public Sprite disable;

    void Start()
    {
        animator   = GetComponent <Animator> ();
        cameraT    = Camera.main.transform;
        controller = GetComponent <CharacterController>();

        DialogueScript = DialogueManager.GetComponent <DialogueManager>();
        //button = GetComponent<UnityEngine.UI.Button>();
        islandScript = GameObject.Find("Water Island").GetComponent <IslandBehaviour>();
        dialogueEnd  = islandScript.isHumanUp();
        button.GetComponent <DestroyButton>().beginningTrue();
    }
Esempio n. 3
0
    // Start is called before the first frame update
    void Start()
    {
        buttonDeactivated = false;
        dialogueBox       = this.transform.parent.gameObject;
        animator          = dialogueBox.GetComponent <Animator>();
        dialogueManager   = dialogueManagerObj.GetComponent <DialogueManager>();

        pickup          = player.GetComponent <PickUp>();
        islandBehaviour = island.GetComponent <IslandBehaviour>();
        highlights      = GameObject.FindGameObjectsWithTag("Highlight");
        dialogueEnd     = islandBehaviour.isHumanUp();
    }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        player       = GameObject.FindWithTag("Player");
        pickUpScript = player.GetComponent <PickUp>();
        //by saving the renderer you will not need to use GetComponent<> again and again
        bagRenderer  = GetComponent <Image>();
        islandScript = GameObject.Find("Water Island").GetComponent <IslandBehaviour>();

        GameObject canvas      = transform.parent.gameObject;
        GameObject dialogueBox = canvas.transform.Find("DialogueBox").gameObject;

        dialogueState = dialogueBox.GetComponent <Animator>();
        // //button = dialogueBox.transform.GetChild(5).gameObject.GetComponent<Button>();

        // shakeScript = canvas.transform.Find("BagImg").GetComponent<Shake>();
    }
Esempio n. 5
0
    void Start()
    {
        // if (lockCursor) {
        //  Cursor.lockState = CursorLockMode.Locked;
        //  Cursor.visible = false;
        // }

        GameObject canvas = GameObject.FindGameObjectWithTag("MainCanvas");

        camIcon             = canvas.transform.Find("CameraIcon").gameObject.GetComponent <Image>();
        camIcon.sprite      = lockedCam;
        lookAroundActivated = false;

        DialogueScript = DialogueManager.GetComponent <DialogueManager>();

        //      if (camTransform == null)
        // {
        //  camTransform = GetComponent(typeof(Transform)) as Transform;
        // }

        IslandScript = island.GetComponent <IslandBehaviour>();
        dialogueEnd  = IslandScript.isHumanUp();
    }
Esempio n. 6
0
    void Start()
    {
        islandScript = island.GetComponent <IslandBehaviour>();

        GameObject canvas = GameObject.FindGameObjectWithTag("MainCanvas");

        stateP = canvas.transform.Find("PKey").gameObject.GetComponent <Image>();

        inRange     = false;
        buttonDown  = false;
        isHolding   = false;
        elementIcon = null;
        // elementUI= null;

        // Look for all active elements in the game and put in array
        elements       = GameObject.FindGameObjectsWithTag("Element");
        DialogueScript = DialogueManager.GetComponent <DialogueManager>();
        cannotPickup   = false;

        rightObjPickedUpTut = false;
        dialogueEnd         = islandScript.isHumanUp();

        cubeInBagRender = cubeInBag.GetComponent <MeshRenderer>();
    }
Esempio n. 7
0
 // Start is called before the first frame update
 void Start()
 {
     islandScript = GameObject.Find("Water Island").GetComponent <IslandBehaviour>();
     countText    = GetComponent <Text>();
 }
Esempio n. 8
0
 // Start is called before the first frame update
 void Start()
 {
     islandScript   = GetComponent <IslandBehaviour>();
     dialogueScript = GetComponent <DialogueTrigger>();
 }