Fixed detection
This commit is contained in:
parent
3ae0de86ba
commit
78c98ac94e
@ -248,7 +248,7 @@ MonoBehaviour:
|
|||||||
_renderLayer: Default
|
_renderLayer: Default
|
||||||
_position: {x: 0, y: 0}
|
_position: {x: 0, y: 0}
|
||||||
_scale: {x: 1, y: 1}
|
_scale: {x: 1, y: 1}
|
||||||
_waveConfig: {fileID: 11400000, guid: 660102a48ad7d2244ab404cfc1f6a573, type: 2}
|
_waveConfig: {fileID: 11400000, guid: d8140ae36f1b7fd4fb1a57ab3dc69de4, type: 2}
|
||||||
_startPopulation: 10
|
_startPopulation: 10
|
||||||
_startFood: 40
|
_startFood: 40
|
||||||
_startWood: 0
|
_startWood: 0
|
||||||
|
|||||||
@ -18,6 +18,6 @@ MonoBehaviour:
|
|||||||
_nestedGroupSpawn:
|
_nestedGroupSpawn:
|
||||||
- groupSpawn:
|
- groupSpawn:
|
||||||
- _enemy: {fileID: 80204295746100150, guid: 2def22091e1ff0d43abe2797c18a2fda, type: 3}
|
- _enemy: {fileID: 80204295746100150, guid: 2def22091e1ff0d43abe2797c18a2fda, type: 3}
|
||||||
_count: 1
|
_count: 2
|
||||||
triggerTime: 0.5
|
triggerTime: 0.5
|
||||||
_gameDuration: 1
|
_gameDuration: 1
|
||||||
|
|||||||
@ -99,7 +99,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_lifeBar: {fileID: 2449956049745952446}
|
_lifeBar: {fileID: 2449956049745952446}
|
||||||
_hp: 10
|
_hp: 500
|
||||||
_speed: 0.04
|
_speed: 0.04
|
||||||
_attack_damage: 10
|
_attack_damage: 10
|
||||||
_attack_interval: 3
|
_attack_interval: 3
|
||||||
@ -108,6 +108,7 @@ MonoBehaviour:
|
|||||||
- {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
|
- {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
|
||||||
- {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
|
- {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
|
||||||
- {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
|
- {fileID: 80204295746100150, guid: 2419a879bd4e47d4fa8b30de0fcdde42, type: 3}
|
||||||
|
creeplingsSpawnRange: 2
|
||||||
--- !u!114 &5416582167583119277
|
--- !u!114 &5416582167583119277
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -471,7 +472,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: c0fbd934c179894458914437255781c4, type: 3}
|
m_Script: {fileID: 11500000, guid: c0fbd934c179894458914437255781c4, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_entity: {fileID: 0}
|
_entity: {fileID: -1263219807028547954}
|
||||||
_projectile: {fileID: 0}
|
_projectile: {fileID: 0}
|
||||||
_projectileSpawn: {fileID: 0}
|
_projectileSpawn: {fileID: 0}
|
||||||
--- !u!1 &1664092137361542638
|
--- !u!1 &1664092137361542638
|
||||||
@ -629,7 +630,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 531d7966d86bd0c4d83baf58bcb56cd5, type: 3}
|
m_Script: {fileID: 11500000, guid: 531d7966d86bd0c4d83baf58bcb56cd5, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_entityLinked: {fileID: 0}
|
_entityLinked: {fileID: -1263219807028547954}
|
||||||
--- !u!1 &2341539422883709986
|
--- !u!1 &2341539422883709986
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|||||||
@ -6,14 +6,16 @@ public class Creeper : Opponent
|
|||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private GameObject[] creeplings;
|
private GameObject[] creeplings;
|
||||||
|
[SerializeField]
|
||||||
|
private float creeplingsSpawnRange = 2f;
|
||||||
|
|
||||||
public override void Death()
|
public override void Death()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < creeplings.Length; i++)
|
for (int i = 0; i < creeplings.Length; i++)
|
||||||
{
|
{
|
||||||
float randomX = Random.Range(0f, 2f) + transform.position.x;
|
float randomX = Random.Range(0f, creeplingsSpawnRange) + transform.position.x;
|
||||||
Vector3 spawnPosition = new Vector3(randomX, transform.position.y, transform.position.z);
|
Vector3 spawnPosition = new Vector3(randomX, transform.position.y, transform.position.z);
|
||||||
GameObject creeplingsInstance = Instantiate(creeplings[i], spawnPosition, Quaternion.identity);
|
Instantiate(creeplings[i], spawnPosition, Quaternion.identity);
|
||||||
}
|
}
|
||||||
base.Death();
|
base.Death();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user