Ejemplo n.º 1
0
    private void SpawnSmok()
    {
        Smoke smokeClone = (Smoke)Instantiate(smokePrefab, transform.position, transform.rotation);
        float smokeSize  = 0.15f;

        smokeClone.transform.localScale = new Vector3(smokeSize, smokeSize, 0);
        smokeClone.transform.SetParent(badParent.transform);
        smokeClone.transform.localPosition = new Vector3(UnityEngine.Random.Range(-5f, 5f), badParent.transform.position.y, 0f);
        smokeClone.GetComponent <Rigidbody2D>().velocity = new Vector2(UnityEngine.Random.Range(-0, 0), UnityEngine.Random.Range(-5, -1));
    }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     TextAnimator        = ButtonText.GetComponent <Animator>();
     smokeParticleSystem = Smoke.GetComponent <ParticleSystem>();
     if (PCstand != null && Keyboard != null)
     {
         PCmats       = PCstand.GetComponent <Renderer>().materials;
         KeyboardMats = Keyboard.GetComponent <Renderer>().materials;
     }
     if (usedLightning != null)
     {
         rainbowLightning = usedLightning.GetComponent <RainbowLightning>();
     }
 }