Example #1
0
        // Use this for initialization
        void Start()
        {
            _gameManager = GameManager_2.Instance;

            _previousPosition = _player.position;

            _objectPool = new List <Transform>();
        }
Example #2
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(gameObject);
     }
 }
Example #3
0
        // 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;
            }
        }
Example #4
0
        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>();
        }