void onKillUnit(UnitPoint unitInfo) { if (unitInfo.team == Teams.BAD) { changeCash(unitInfo.info().killCash); changeScore(unitInfo.info().killScore); } }
void OnDrawGizmos() { Gizmos.color = new Color(0, 0, 1, 0.1f); Gizmos.DrawSphere(transform.position, unitPoint.info().viewRadius); Gizmos.color = new Color(1, 0, 0, 0.1f); Gizmos.DrawSphere(transform.position, unitPoint.info().weapon.radius); }
public void init(int unitId, int team, Transform moveFinalTarget) { this.moveFinalTarget = moveFinalTarget; unitPoint = new UnitPoint(); unitPoint.team = team; unitPoint.id = unitId; unitPoint.currentLife = unitPoint.info().life; }