weaker bugs | spawn particles for bugs
This commit is contained in:
parent
d0be341337
commit
6450b2b44d
8 changed files with 4693 additions and 21 deletions
File diff suppressed because it is too large
Load diff
|
@ -1153,7 +1153,7 @@ Prefab:
|
||||||
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
|
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
|
||||||
type: 2}
|
type: 2}
|
||||||
propertyPath: m_AnchoredPosition.x
|
propertyPath: m_AnchoredPosition.x
|
||||||
value: 65.33481
|
value: 65.89836
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
|
- target: {fileID: 224150154901314796, guid: 460d856ea4eb14cedb5fecde1fe6d743,
|
||||||
type: 2}
|
type: 2}
|
||||||
|
|
|
@ -17,6 +17,10 @@ namespace Assets.Scripts.Entities.Attack {
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetCooldown(float cd) {
|
||||||
|
cooldown = cd;
|
||||||
|
}
|
||||||
|
|
||||||
public void SetSpawn(Transform t) {
|
public void SetSpawn(Transform t) {
|
||||||
spawn = t;
|
spawn = t;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,14 @@ namespace Assets.Scripts.Entities {
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private GameObject bullet;
|
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);
|
SingleShot s = new SingleShot(this.gameObject);
|
||||||
|
s.SetCooldown(3);
|
||||||
s.SetPrefab(bullet);
|
s.SetPrefab(bullet);
|
||||||
s.SetSpawn(bulletSpawn);
|
s.SetSpawn(bulletSpawn);
|
||||||
SetAttack(s);
|
SetAttack(s);
|
||||||
|
|
|
@ -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() {
|
void Update() {
|
||||||
|
|
||||||
if ( victim == null || attack == null ) {
|
if ( victim == null || attack == null ) {
|
||||||
|
|
|
@ -9,9 +9,9 @@ namespace Assets.Scripts.Entities {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start() {
|
protected override void Start() {
|
||||||
|
base.Start();
|
||||||
SetAttack(new MeleeAttack(this.gameObject));
|
SetAttack(new MeleeAttack(this.gameObject));
|
||||||
GetComponentInChildren<ParticleSystem>().Play();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9ec323b9157704d00a3409f8ea6e46b2
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: df6e7833427b5497b92308fb6f54e552
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
Loading…
Add table
Reference in a new issue