// Use this for initialization void Start() { _gameManager = GameManager_2.Instance; _previousPosition = _player.position; _objectPool = new List <Transform>(); }
private void Awake() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
// Use this for initialization void Start() { _gameManager = GameManager_2.Instance; _soundManager = SoundManager_2.Instance; _particle = GetComponentInParent <ParticleSystem>(); _particle.Stop(); if (_player == null) { _player = GameObject.Find("Sled").transform; } }
private void Start() { _gameManager = GameManager_2.Instance; _soundManager = SoundManager_2.Instance; _spring = GetComponent <SpringJoint2D>(); _projectileRigidbody = GetComponent <Rigidbody2D>(); _slingshot = _spring.connectedBody.transform; LineRendererSetup(); _raySlingshotToTouch = new Ray(_slingshot.position, Vector3.zero); _fireworkCurrentCount = _fireworkMaxCount; _fireworkEffect = transform.Find("FireworkEffect").GetComponent <ParticleSystem>(); }