Beispiel #1
0
 public override void Start()
 {
     fireData = new FireBuilder(bulletPrefab, Field);
     fireData.From(transform);
     fireData.Towards(Player.transform);
     fireData.WithSpeed(3 + 3 * Difficulty);
 }
 private void OnServerFireCreate(Position position)
 {
     var _ = new FireBuilder()
             .SetPosition(position)
             .SetFlameSpawnDelay(3000)
             .InitializeFire();
 }
Beispiel #3
0
 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));
 }
Beispiel #5
0
    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();
    }
Beispiel #6
0
    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();
    }
Beispiel #7
0
    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);
    }
Beispiel #8
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);
    }
Beispiel #9
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());
    }
Beispiel #10
0
    public override void Start()
    {
        fireList.Sort((a, b) => (int)(a.Time * 100 - b.Time * 100));

        fireData = new FireBuilder(bulletPrefab, Field);
        fireData.WithSpeed(fireSpeed);

        warningList = new List <Wave.WarningData>();
        foreach (Wave.SpawnData spawn in fireList)
        {
            if (spawn.Time - warningDuration >= 0)
            {
                Wave.WarningData temp = new Wave.WarningData();
                temp.Prefab          = warningPrefab;
                temp.Data            = spawn;
                temp.Data.Time      -= warningDuration;
                temp.Duration        = warningDuration;
                temp.FadeInDuration  = warningFadeInDuration;
                temp.FadeOutDuration = warningFadeOutDuration;
                warningList.Add(temp);
            }
        }
    }