public override void Update() { base.Update(); if (!LevelController.Singleton.Paused) { time += Time.deltaTime; while (warningList.Count > 0 && time >= warningList[0].Data.Time) { Wave.SpawnWarning(warningList[0]); warningList.RemoveAt(0); } while (fireList.Count > 0 && time >= fireList[0].Time) { for (int i = 0; i < 360; i += 5) { for (int j = 0; j < 10; j++) { fireData.From(new Vector2(fireList[0].Location.x + Mathf.Cos((i + j) * Mathf.Deg2Rad) * (30 + j), fireList[0].Location.y + Mathf.Sin((i + j) * Mathf.Deg2Rad) * (30 + j))); fireData.Towards(new Vector2(fireList[0].Location.x + Mathf.Cos((i + j + 90) * Mathf.Deg2Rad) * fireRadius, fireList[0].Location.y + Mathf.Sin((i + j + 90) * Mathf.Deg2Rad) * fireRadius)); fireData.Fire(); } } fireList.RemoveAt(0); if (fireList.Count == 0) { Destroy(gameObject, 5); } } } }
public override void Start() { fireData = new FireBuilder(bulletPrefab, Field); fireData.From(transform); fireData.Towards(Player.transform); fireData.WithSpeed(3 + 3 * Difficulty); }
public override void Start() { fireData = new FireBuilder(bulletPrefab, Field); fireData.From(transform); fireData.Towards(Player.transform); fireData.WithSpeed(6); fireData.WithModifier(new CircularBurstModifier(100, 5, 0, 0)); }
public override void Start() { fireData = new FireBuilder(bulletPrefab, Field); fireData.From(transform); fireData.Towards(Player.transform); fireData.WithSpeed(6 + 2 * Difficulty); fireData.WithModifier(new RandomizeAngleModifier(360)); }
public override void Start() { rigidbody2d = GetComponent <Rigidbody2D>(); fireData = new FireBuilder(bulletPrefab, Field); fireData.From(transform); fireData.WithSpeed(0); fireData.WithController(new AutoDeactivateController(2.0f)); base.Start(); }
public override void Start() { rigidbody2d = GetComponent <Rigidbody2D>(); fireData = new FireBuilder(bulletPrefab, Field); fireData.From(transform); fireData.WithSpeed(10 + Difficulty); fireData.WithModifier(new CircularBurstModifier(100, 5, 0, 0)); base.Start(); }
public override void Start() { fireData = new FireBuilder(bulletPrefab, Field); fireData.From(transform); fireData.WithSpeed(3); fireData.WithAngularSpeed(45); fireData.WithModifier(new CircularBurstModifier(340, new DynamicInt(10, 20), 0, 0)); fireData.WithController(new AccelerationController(3)); GetComponent <Rigidbody2D>().velocity = new Vector2(0, -2); SetRotation(0); }
public override void Start() { direction = transform.position.x < 0 ? 1 : -1; transform.Rotate(Vector3.forward * -90 * direction); fireData = new FireBuilder(bulletPrefab, Field); fireData.From(transform); fireData.Towards(new Vector2(0, transform.position.y)); fireData.WithSpeed(3); fireData.WithRotation(-30, 30); rigidbody2d = GetComponent <Rigidbody2D>(); rigidbody2d.velocity = new Vector2(direction * 4, 0); }
public override void Start() { fireDataBullet = new FireBuilder(bulletPrefab, Field); fireDataBullet.From(transform); fireDataBullet.WithSpeed(12); fireDataBullet.WithModifier(new CircularBurstModifier(45, 7, 0, 0)); fireDataBullet.WithController(new AccelerationController(3)); fireDataLaser = new FireBuilder(laserPrefab, Field); fireDataLaser.From(transform); fireDataLaser.WithSpeed(0); fireDataLaser.WithRotation(transform); fireDataLaser.WithController(new AutoDeactivateController(0.25f)); StartCoroutine(Attack()); }