void fireShot() { //the middle is 0.5, we add some variance. float horz = 0.5f + Random.Range(-variance, variance); float vert = 0.5f + Random.Range(-variance, variance); BaseGameManager.setDart(horz, vert); }
public void onPowerbarPress(Powerbar powerbar) { if (m_myTurn) { Powerbar.PowerbarType ptype = powerbar.getPowerbarType(); if (ptype == Powerbar.PowerbarType.HORZ) { horz = powerbar.getValueAsScalar(); } if (ptype == Powerbar.PowerbarType.VERT) { vert = powerbar.getValueAsScalar(); BaseGameManager.setDart(horz, vert); } } }