コード例 #1
0
ファイル: AIPlayer.cs プロジェクト: lickey10/Darts
        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);
        }
コード例 #2
0
 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);
         }
     }
 }