// Use this for initialization void Start () { comboIndicator = Instantiate(comboIndicatorPrefab) as ComboIndicator; comboIndicator.transform.SetParent(transform); comboIndicator.transform.localPosition = comboIndicatorOffset; comboIndicator.Initialize(id); if (castIndicatorPrefab != null) { castIndicator = Instantiate(castIndicatorPrefab) as EnemyCastIndicator; castIndicator.transform.SetParent(transform); castIndicator.transform.localPosition = castIndicatorOffset; castIndicator.gameObject.SetActive(false); } if (spawnPoint != null) { spawnPoint.occupied = true; } castSpeed = RandomCastSpeed(); castFactor = 0.0f; castDelay = Random.Range(castDelayMin, castDelayMax); hasBeenFiredAt = false; currentState = State.Startup; particleSpawner = FindObjectOfType<ParticleSpawner>(); eggEffect = FindObjectOfType<EggEffect>(); }
void Awake() { Instance = this; }
void Awake() { particleSpawner = LevelCommon.FindLevelCommonComponent <ParticleSpawner>(); }
//private Health health; private void Start() { particleSpawner = GetComponent <ParticleSpawner>(); //health = GetComponent<Health>(); }
public Ship(ShipInfo shipInfo, BaseProjectilesController projController, ParticleSystem parSystem, int team, Vector2 pos, int id) : base(shipInfo, projController, team, pos, id, true) { particleSpawner = new ParticleSpawner(parSystem, this, shipInfo.spawnerInfo); drawable = new Drawable(shipInfo.texture, size: shipInfo.spriteSize, col: shipInfo.color); }
void Start() { instance = this; }