1
0
Fork 0

weaker bugs | spawn particles for bugs

This commit is contained in:
Saibotk 2018-04-23 20:19:12 +02:00
parent d0be341337
commit 6450b2b44d
8 changed files with 4693 additions and 21 deletions

File diff suppressed because it is too large Load diff

View file

@ -1153,7 +1153,7 @@ Prefab:
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
type: 2}
propertyPath: m_AnchoredPosition.x
value: 65.33481
value: 65.89836
objectReference: {fileID: 0}
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
type: 2}

View file

@ -17,6 +17,10 @@ namespace Assets.Scripts.Entities.Attack {
this.owner = owner;
}
public void SetCooldown(float cd) {
cooldown = cd;
}
public void SetSpawn(Transform t) {
spawn = t;
}

View file

@ -11,12 +11,14 @@ namespace Assets.Scripts.Entities {
[SerializeField]
private GameObject bullet;
public Bug() : base(15) {
public Bug() : base(5) {
}
private void Start() {
protected override void Start() {
base.Start();
SingleShot s = new SingleShot(this.gameObject);
s.SetCooldown(3);
s.SetPrefab(bullet);
s.SetSpawn(bulletSpawn);
SetAttack(s);

View file

@ -24,6 +24,13 @@ namespace Assets.Scripts.Entities {
}
protected virtual void Start() {
ParticleSystem ps = GetComponentInChildren<ParticleSystem>();
if(ps != null && ps.name == "spawn") {
ps.Play();
}
}
void Update() {
if ( victim == null || attack == null ) {

View file

@ -9,9 +9,9 @@ namespace Assets.Scripts.Entities {
}
private void Start() {
protected override void Start() {
base.Start();
SetAttack(new MeleeAttack(this.gameObject));
GetComponentInChildren<ParticleSystem>().Play();
}
}
}

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 9ec323b9157704d00a3409f8ea6e46b2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: df6e7833427b5497b92308fb6f54e552
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: