Upgrade System
This commit is contained in:
@@ -196,3 +196,4 @@ MonoBehaviour:
|
||||
Speed: 1
|
||||
Damages: 100
|
||||
Life: 1000
|
||||
_orb: {fileID: 4247841200454641178, guid: 5f995817aeb7ddc4e841633e73c7ff59, type: 3}
|
||||
|
||||
@@ -12,9 +12,11 @@ public class Ennemy : MonoBehaviour
|
||||
private SpriteRenderer _sr;
|
||||
private Transform _player;
|
||||
|
||||
public float Life = 100;
|
||||
public float Speed = .1f;
|
||||
public int Damages = 1;
|
||||
public int Life = 100;
|
||||
|
||||
[SerializeField] private GameObject _orb;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@@ -31,14 +33,33 @@ public class Ennemy : MonoBehaviour
|
||||
if (gameObject.name.Contains("Mayor"))
|
||||
{
|
||||
_player.GetComponent<PlayerManager>().MayorKills++;
|
||||
for(int i = 0; i < 5; i++)
|
||||
{
|
||||
Instantiate(_orb, transform.position, Quaternion.identity);
|
||||
}
|
||||
}
|
||||
else if (gameObject.name.Contains("Minotaur"))
|
||||
else if (gameObject.name.Contains("Minautor"))
|
||||
{
|
||||
_player.GetComponent<PlayerManager>().MinautorKills++;
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
GameObject _spawnedOrb = Instantiate(_orb, transform.position, Quaternion.identity);
|
||||
_spawnedOrb.GetComponent<OrbStats>().OrbValue = OrbValues.Ten;
|
||||
}
|
||||
}
|
||||
else if(gameObject.name.Contains("Bringer of Death"))
|
||||
{
|
||||
_player.GetComponent<PlayerManager>().BringerOfDeathKills++;
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
GameObject _spawnedOrb = Instantiate(_orb, transform.position, Quaternion.identity);
|
||||
_spawnedOrb.GetComponent<OrbStats>().OrbValue = OrbValues.Hundred;
|
||||
}
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
GameObject _spawnedOrb = Instantiate(_orb, transform.position, Quaternion.identity);
|
||||
_spawnedOrb.GetComponent<OrbStats>().OrbValue = OrbValues.Ten;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,6 +124,7 @@ MonoBehaviour:
|
||||
Speed: 0.2
|
||||
Damages: 10
|
||||
Life: 100
|
||||
_orb: {fileID: 4247841200454641178, guid: 5f995817aeb7ddc4e841633e73c7ff59, type: 3}
|
||||
--- !u!61 &247299863115505385
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -196,3 +196,4 @@ MonoBehaviour:
|
||||
Speed: 0.7
|
||||
Damages: 75
|
||||
Life: 500
|
||||
_orb: {fileID: 4247841200454641178, guid: 5f995817aeb7ddc4e841633e73c7ff59, type: 3}
|
||||
|
||||
Reference in New Issue
Block a user