public Spawner(string prefab, float min, float max, Director director) { Prefab = prefab; MinSpawnDelay = min; MaxSpawnDelay = max; CurrentSpawnDelay = Random.Range(MinSpawnDelay, MaxSpawnDelay); Director = director; }
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) }); } }
void Start() { _dir = GameObject.Find("Director").GetComponent<Director>(); }
void Start() { _dir = GameObject.Find("Director").GetComponent <Director>(); }