示例#1
0
        public void RandomWind()
        {
            if (Network.gamemode == BattleType.AI_1v1)
            {
                float flag = ((GOWRandom.GetRandom() & 1) << 1) - 1;
                if (Wind > -300 && Wind < 300)
                {
                    Wind += wind_step * GOWRandom.GetRandom() / 1000.0f * flag * 0.5f;
                }
                else
                {
                    Wind += wind_step * GOWRandom.GetRandom() / 1000.0f * flag * 1.2f;
                }
            }
            else if (Network.NetworkMode == true)
            {
                if (Wind > -300 && Wind < 300)
                {
                    Wind += wind_step * Network.Wind / 1000.0f * 0.5f;
                }
                else
                {
                    Wind += wind_step * Network.Wind / 1000.0f * 1.2f;
                }
            }
            else
            {
                float flag = ((GOWRandom.GetRandom() & 1) << 1) - 1;
                if (Wind > -300 && Wind < 300)
                {
                    Wind += wind_step * GOWRandom.GetRandom() / 1000.0f * flag * 0.5f;
                }
                else
                {
                    Wind += wind_step * GOWRandom.GetRandom() / 1000.0f * flag * 1.2f;
                }
            }

            if (Wind > wind_range)
            {
                Wind %= wind_range;
                Wind  = -Wind;
            }
            else if (Wind < -wind_range)
            {
                Wind  = -Wind;
                Wind %= -wind_range;
            }
            //Wind = -wind_range;
        }
示例#2
0
 public string GetCharaterName(string _name)
 {
     if (_name == "first_name")
     {
         return(m_dicFirstNameDate[GOWRandom.GetRandom() % (m_dicFirstNameDate.Count)]);
     }
     else if (_name == "second_name")
     {
         return(m_dicSecondNameDate[GOWRandom.GetRandom() % m_dicSecondNameDate.Count]);
     }
     else
     {
         return(m_dicThirdNameDate[GOWRandom.GetRandom() % m_dicThirdNameDate.Count]);
     }
 }
示例#3
0
 public EncrypInt()
 {
     m_iIndex = 5 + GOWRandom.GetRandom() % 11;
     Value    = 0;
 }