|
|
|
|
|
|
{ |
|
|
|
if (hit.collider.gameObject.CompareTag("StrongSmallAgent") || hit.collider.gameObject.CompareTag("WeakSmallAgent")) |
|
|
|
{ |
|
|
|
hit.collider.gameObject.GetComponent<SmallCubeAgent>().HitAgent(fireDamage); |
|
|
|
AddReward(.1f); |
|
|
|
if (hit.collider.gameObject.GetComponent<SmallCubeAgent>().HitAgent(fireDamage)) |
|
|
|
{ |
|
|
|
AddReward(.1f); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (hit.collider.gameObject.CompareTag("StrongLargeAgent") || hit.collider.gameObject.CompareTag("WeakLargeAgent")) |
|
|
|
{ |
|
|
|
|
|
|
{ |
|
|
|
if (hit.collider.gameObject.CompareTag("StrongSmallAgent") || hit.collider.gameObject.CompareTag("WeakSmallAgent")) |
|
|
|
{ |
|
|
|
hit.collider.gameObject.GetComponent<SmallCubeAgent>().HitAgent(.8f); |
|
|
|
AddReward(.1f); |
|
|
|
if (hit.collider.gameObject.GetComponent<SmallCubeAgent>().HitAgent(.8f)) |
|
|
|
{ |
|
|
|
AddReward(.1f); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|