Esempio n. 1
0
 private void Start()
 {
     if (fx)
     {
         FX = GetComponent <SpawnFX>();
     }
 }
Esempio n. 2
0
        Vector2 direction; // for now should not change during travel

        private void Start()
        {
            LS = GetComponent <ListAnimation>();
            FX = GetComponent <SpawnFX>();
            if (LS != null)
            {
                LS.PlayAnimation(0);
                primeTime = LS.currentAniTime();
                //Debug.Log(primeTime);
            }

            bool f = false;

            if (transform.lossyScale.x > 0)
            {
                f = true;
            }
            direction = Menu.UsefulStuff.FromRotationToVector(transform.rotation.eulerAngles.z, f);

            if (FX != null)
            {
                FX.DoFX(direction, transform.position, 30, 10, new int[] { 0 }, 3);
            }
            SR = GetComponent <SpriteRenderer>();
            SR.sortingOrder = Random.Range(-5, 6);
        }