Fixed nan exception
This commit is contained in:
@ -56,6 +56,7 @@ public class FlagZone : MonoBehaviour
|
||||
}
|
||||
else if (occupAttackers > 0)
|
||||
{
|
||||
print("Atackers ocuppy flag");
|
||||
TimeStayAttackers += Time.deltaTime;
|
||||
GameManager._attackersTeam.AddGroupReward(Time.deltaTime* 0.1f);
|
||||
GameManager._defendersTeam.AddGroupReward(-Time.deltaTime* 0.1f);
|
||||
@ -67,6 +68,8 @@ public class FlagZone : MonoBehaviour
|
||||
}
|
||||
else if (occupDefenders > 0)
|
||||
{
|
||||
print("Defenders ocuppy flag");
|
||||
GameManager._defendersTeam.AddGroupReward(+Time.deltaTime* 0.1f);
|
||||
TimeStayDefenders += Time.deltaTime;
|
||||
if (TimeStayDefenders > timeForWin)
|
||||
{
|
||||
|
@ -15,6 +15,7 @@ public class NavPoint : MonoBehaviour
|
||||
public float FlagDistance { get; private set; }
|
||||
|
||||
[SerializeField] public NavPointType navType;
|
||||
[HideInInspector] public bool isOcuppied;
|
||||
|
||||
[HideInInspector] public int PointId = 0;
|
||||
[HideInInspector] public float DeathAttr = 0;
|
||||
|
Reference in New Issue
Block a user