private void OnMouseDown() { if (inputBlock) { return; } _currBullet = Instantiate(_bulletPrefab, _bulletSpawnPos); _isScaling = true; }
// Use this for initialization void Start() { GFXTransform = GFX.GetComponent <Transform>(); //playerRigidbody = GetComponent<Rigidbody>(); playerData = GetComponent <PlayerData>(); playerUI = GetComponent <PlayerUI>(); charController = GetComponent <CharacterController>(); bulletToPoint = GetComponentInChildren <BulletToPoint>(); bulletSphere = GetComponentInChildren <BulletSphere>(); animator = GetComponentInChildren <Animator>(); _health = maxHealth; meleeCollider.SetActive(false); Cursor.lockState = CursorLockMode.Locked; //print(GameManager.currentCheckpoint); if (GameManager.currentCheckpoint != null) { transform.position = GameObject.Find(GameManager.currentCheckpoint).transform.position; } }