Example #1
0
 public Spawner(string prefab, float min, float max, Director director)
 {
     Prefab = prefab;
     MinSpawnDelay = min;
     MaxSpawnDelay = max;
     CurrentSpawnDelay = Random.Range(MinSpawnDelay, MaxSpawnDelay);
     Director = director;
 }
Example #2
0
        void Start()
        {
            _dir = GameObject.Find("Director").GetComponent<Director>();

            var part = GameObject.Find("Head").transform;
            foreach (Transform child in part.GetComponentsInChildren<Transform>())
            {
                _parts.Add(new DragonPart
                {
                    Part = child,
                    Parent = child.parent,
                    StartPosition = new Vector3(child.localPosition.x, child.localPosition.y * -1, 0)
                });
            }
        }
Example #3
0
 void Start()
 {
     _dir = GameObject.Find("Director").GetComponent<Director>();
 }
Example #4
0
 void Start()
 {
     _dir = GameObject.Find("Director").GetComponent <Director>();
 }