コード例 #1
0
ファイル: StageManager.cs プロジェクト: FukyVer2/Hero-Cowboy
 void Stage(Enemy _enemy, TypeStage type)
 {
     switch(type)
     {
         case TypeStage.DELAY:
             //Delay();
             break;
         case TypeStage.STUN:
             //Stun();
             break;
         case TypeStage.SLOW:
             //Slow();
             break;
     }
 }
コード例 #2
0
ファイル: GetStatic.cs プロジェクト: rikusov/DataProcessing
        public IndexoftheMatch(string _index)//создание индексов
        {
            if (_index.Length != 10)
            {
                throw DataExeption.DataProcessingExeptions.ErrorFormatIndex("Invalid year of index(index is ten symbols)");
            }
            int _typestage = Convert.ToInt32(_index[2].ToString());

            type = (TypeStage)_typestage;
            if (_typestage < 1 || _typestage > 4)
            {
                throw DataExeption.DataProcessingExeptions.ErrorFormatIndex("Invalid year of index(false type stage)");
            }
            int _season = Convert.ToInt32(_index[3].ToString() + _index[4].ToString());

            if (_season <= DateTime.Now.Year - 2000)
            {
                _season += 2000;
            }
            else
            {
                _season += 1900;
            }
            if (_season < 1983 || _season > DateTime.Now.Year)
            {
                throw DataExeption.DataProcessingExeptions.ErrorFormatIndex("Invalid year of index(year should be more 1983)");
            }
            season = _season;
            int ind = Convert.ToInt32(_index[5].ToString() + _index[6].ToString() + _index[7].ToString() + _index[8].ToString() + _index[9].ToString());

            if (type == TypeStage.Season)
            {
                if (!Default.Usual.SwitchinRangeCountGame(ind, _season, type))
                {
                    throw DataExeption.DataProcessingExeptions.ErrorFormatIndex($"Invalid number game of index(game {ind.ToString()}) in year {_season} dont found");
                }
            }
            index     = ind;
            IndexGame = _index;
        }
コード例 #3
0
ファイル: GetStatic.cs プロジェクト: rikusov/DataProcessing
        public IndexoftheMatch(TypeStage ts, int _season, int _index)//создание индексов
        {
            type = ts;
            if (_season < 1983 || _season > DateTime.Now.Year)
            {
                throw DataExeption.DataProcessingExeptions.ErrorFormatIndex("Invalid year of index(year should be more 1983)");
            }
            season = _season;
            if (type == TypeStage.Season)
            {
                if (!Default.Usual.SwitchinRangeCountGame(_index, _season, type))
                {
                    throw DataExeption.DataProcessingExeptions.ErrorFormatIndex($"Invalid number game of index(game {_index.ToString()}) in year {_season} dont dound");
                }
            }
            index = _index;
            string template = index.ToString();

            while (template.Length != 5)
            {
                template = '0' + template;
            }
            IndexGame = "00" + ((int)type).ToString() + (_season % 100).ToString() + template;
        }