void Update() { UICheck(); if (uiActive) { spawnInk = FindObjectOfType <SpawnInk>(); } Player = GameObject.FindGameObjectWithTag("Player"); groundCheck = GameObject.Find("Ground Check").transform; if (groundCheck == null) { Debug.Log("Ground Check not found"); } isGrounded = Physics2D.Linecast(transform.position, groundCheck.position, layerGround); Aiming(); ammoBehaviour.AmmoLimiter(); if (Input.GetKeyDown(KeyCode.Space)) { _jumped = true; } WallJumping(); if (touchingSticky) { PlayerMovement(false); } }
// Update is called once per frame void Update() { playerBehaviour = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerBehaviour>(); if (playerBehaviour.uiActive) { spawnInk = GameObject.Find("InkSpray").GetComponent <SpawnInk>(); } }
// Use this for initialization void Start() { playerBehaviour = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerBehaviour>(); if (playerBehaviour.uiActive) { spawnInk = GameObject.Find("InkSpray").GetComponent <SpawnInk>(); } ammoBehaviour = FindObjectOfType <AmmoBehaviour>(); }
// Use this for initialization void Start() { spawnInk = GameObject.Find("InkSpray").GetComponent <SpawnInk>(); spawnAmmo = GetComponent <SpawnAmmo>(); if (spawnAmmo == null) { Debug.Log("Couldn't find spawn ammo script"); } ChangeColour(type); }
// Use this for initialization void Start() { canReduceAmmo = true; gameManager = FindObjectOfType <GameManager>(); spawnInk = FindObjectOfType <SpawnInk>(); }