Esempio n. 1
0
	// 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;
 }
Esempio n. 3
0
 void Awake()
 {
     particleSpawner = LevelCommon.FindLevelCommonComponent <ParticleSpawner>();
 }
Esempio n. 4
0
    //private Health health;


    private void Start()
    {
        particleSpawner = GetComponent <ParticleSpawner>();
        //health = GetComponent<Health>();
    }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 void Start()
 {
     instance = this;
 }