2018-04-23 16:44:02 +02:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using Assets.Scripts.Entities.Attack;
|
|
|
|
|
|
|
|
|
|
namespace Assets.Scripts.Entities {
|
|
|
|
|
|
|
|
|
|
public class Bug : Enemy {
|
2018-04-23 19:50:04 +02:00
|
|
|
|
[SerializeField]
|
|
|
|
|
private Transform bulletSpawn;
|
|
|
|
|
[SerializeField]
|
|
|
|
|
private GameObject bullet;
|
2018-04-23 16:44:02 +02:00
|
|
|
|
|
2018-04-23 20:19:12 +02:00
|
|
|
|
public Bug() : base(5) {
|
2018-04-23 16:08:16 +02:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-23 20:19:12 +02:00
|
|
|
|
protected override void Start() {
|
2018-04-24 15:58:27 +02:00
|
|
|
|
SingleShot s = new SingleShot(this.gameObject, 8, 3, 8 );
|
|
|
|
|
s.SetRange(3);
|
2018-04-23 19:50:04 +02:00
|
|
|
|
s.SetPrefab(bullet);
|
|
|
|
|
s.SetSpawn(bulletSpawn);
|
2018-04-24 21:07:32 +02:00
|
|
|
|
SetAttack(s);
|
|
|
|
|
base.Start();
|
2018-04-23 16:08:16 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2018-04-23 16:44:02 +02:00
|
|
|
|
}
|