NulcleusDNAEffect.cs 786 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class NulcleusDNAEffect : MonoBehaviour {
  5. public int DNACount = 50;
  6. public GameObject DNAObject;
  7. GameObject[] DNAs;
  8. // Use this for initialization
  9. void Start () {
  10. DNAs = new GameObject[DNACount];
  11. for(int i=0;i<DNACount;i++)
  12. {
  13. Vector3 pos = new Vector3(Random.Range(-400, 400), Random.Range(-400, 400), Random.Range(1100, 2000));
  14. GameObject go = Instantiate(DNAObject);
  15. go.transform.position = pos;
  16. go.transform.rotation = Quaternion.Euler(Random.value * 360f, Random.value * 360f, Random.value * 360f);
  17. DNAs[i] = go;
  18. }
  19. }
  20. // Update is called once per frame
  21. void Update () {
  22. }
  23. }