コード例 #1
0
        static void Main(string[] args)
        {
            //string s = "我现在要提交代码到我的github版本库中。";
            //string s1 = "我又来提交测试了。aaaaaa";
            //string s2 = "不在宿舍里做的修改。sss ";
            //Console.WriteLine("hello world.");
            //Console.ReadKey();

            Paradigm demo = new Paradigm();

            int[] arr = new int[] { 1, 5, 6, 7, 9, 2, 4 };
            demo.BubbleSort <int>(arr);
            string str = string.Empty;

            for (int i = 0; i < arr.Length; i++)
            {
                str += arr[i] + ",";
            }
            Console.WriteLine("Current array value is {0}", str.Trim(','));
            Paradigm demomoive = new Paradigm();

            Moive[] moiveArr = new Moive[]
            {
                new Moive("少林寺", 4M),
                new Moive("华城", 4M),
                new Moive("上海滩", 5M),
            };
            demomoive.BubbleSort <Moive>(moiveArr);

            Console.ReadKey();
        }
コード例 #2
0
    public List <GameObject> RetrieveAllyModels()
    {
        List <GameObject> models   = new List <GameObject>();
        List <int>        modelIds = new List <int>();

        foreach (var allyId in GameData.Instance.currentPartyMemberCharacterIds)
        {
            Paradigm allyParadigm = GameData.Instance.allyEquippedSouldParadigms[allyId];
            modelIds.Add(modelInformationDatabase.Find(x => x.characterId == allyId && x.paradigm == allyParadigm).modelId);
        }
        //loops through all ids
        for (int i = 0; i < modelIds.Count; i++)
        {
            //loops through all model info records
            for (int ii = 0; ii < allyDatabase.transform.childCount; ii++)
            {
                ModelId model = allyDatabase.transform.GetChild(ii).GetComponent <ModelId>();

                if (checkedOutAllyModels.ContainsKey(model.GetInstanceID()) == false && model.modelId == modelIds[i])
                {
                    models.Add(model.gameObject);
                    checkedOutAllyModels.Add(model.GetInstanceID(), new Vector2(model.transform.localPosition.x, model.transform.localPosition.y));
                    break;
                }
            }
        }
        return(models);
    }
コード例 #3
0
 //Making a Mode
 public NewMode(Paradigm _paradigm, float _attackMultiplier, float _armorMultiplier, float _speedMultiplier, float _jumpMultiplier)
 {
     paradigm           = _paradigm;
     armorMultiplier    = _armorMultiplier;
     attackMultiplier   = _attackMultiplier;
     moveSpeedMultipler = _speedMultiplier;
     jumpMultiplier     = _jumpMultiplier;
 }
コード例 #4
0
ファイル: ParadigmGeneratorA.cs プロジェクト: ExShini/workRep
 public Paradigm(Paradigm _par)
 {
     word = _par.word;
     case_w = _par.case_w;
     number = _par.number;
     CodeOfSpeech = _par.CodeOfSpeech;
     gender = _par.gender; 
 }
コード例 #5
0
    public override void ActivateFunctionality()
    {
        if (!ParadigmGranted)
        {
            // Generate a new paradigm to grab its name.
            newParadigm  = new Paradigm();
            paradigmName = newParadigm.Name;

            // Open terminal window, and pass this object.
            // Object is passed so functionality can be executed on terminal window close.
            TerminalWindow.instance.openParadigmWindow(this);
        }
    }
コード例 #6
0
 public SoulParadigm(Paradigm soulParadigm, string souldDescription, int soulCoreFirewall, int soulCompiler, int soulDefenseMatrix,
                     int soulPredictiveAlgorithms, Paradigm[] soulRequiredParadigms, Paradigm[] additionalParadigmSkills)
 {
     paradigm                      = soulParadigm;
     description                   = souldDescription;
     coreFirewall                  = soulCoreFirewall;
     compiler                      = soulCompiler;
     defenseMatrix                 = soulDefenseMatrix;
     predictiveAlgorithms          = soulPredictiveAlgorithms;
     requiredParadigms             = soulRequiredParadigms;
     this.additionalParadigmSkills = additionalParadigmSkills;
     //icon = Resources.Load<Sprite>("Paradigm Icons/" + soulParadigm);
 }
コード例 #7
0
    public void InitializeGameData()
    {
        if (MasterControl.Instance.GetCurrentGameDataFile() == GameDataFile.Aplha)
        {
            playerLocation = Alpha_PlayerLocation;
            currentPartyMemberCharacterIds = Alpha_CurrentPartyMemberCharacterIds;
            playerEquippedSoulParadigm     = Alpha_PlayerEquippedSoulParadigm;
            aquiredTreeNodes           = Alpha_AquiredTreeNodes;
            playerCoreFirewall         = Alpha_PlayerCoreFirewall;
            playerCompiler             = Alpha_PlayerCompiler;
            playerDefenseMatrix        = Alpha_PlayerDefenseMatrix;
            playerPredictiveAlgorithms = Alpha_PlayerPredictiveAlgorithms;
        }
        else if (MasterControl.Instance.GetCurrentGameDataFile() == GameDataFile.Beta)
        {
        }
        else if (MasterControl.Instance.GetCurrentGameDataFile() == GameDataFile.Omega)
        {
        }

        #region Testing
        playerLocation = Location.Hub_Town;
        currentPartyMemberCharacterIds = new List <int>
        {
            2,
            3
        };
        playerEquippedSoulParadigm = Paradigm.Sorceror;
        aquiredTreeNodes           = new List <TreeNode>()
        {
            TreeNodeDatabase.Instance.treeNodeDatabase[0],
            TreeNodeDatabase.Instance.treeNodeDatabase[1]
        };

        allyEquippedSouldParadigms = new Dictionary <int, Paradigm>()
        {
            { 2, Paradigm.Soldier },
            { 3, Paradigm.Bishop }
        };

        playerPatience  = 16.5f;
        playerSomething = 16.5f;
        playerCunning   = 16.5f;
        playerLogical   = 16.5f;
        playerKindness  = 16.5f;
        playerCharisma  = 16.5f;

        //UpdatePlayerStatsAndSkills();
        #endregion
    }
コード例 #8
0
 private void PrepareGameDataForWrite()
 {
     if (MasterControl.Instance.GetCurrentGameDataFile() == GameDataFile.Aplha)
     {
         Alpha_PlayerLocation = playerLocation;
         Alpha_CurrentPartyMemberCharacterIds = currentPartyMemberCharacterIds;
         Alpha_PlayerEquippedSoulParadigm     = playerEquippedSoulParadigm;
         Alpha_AquiredTreeNodes = aquiredTreeNodes;
     }
     else if (MasterControl.Instance.GetCurrentGameDataFile() == GameDataFile.Beta)
     {
     }
     else if (MasterControl.Instance.GetCurrentGameDataFile() == GameDataFile.Omega)
     {
     }
 }
コード例 #9
0
 public ProgrammingLanguage(string name, int year, Paradigm paradigm, Typing typing, Level level, OperatingSystem operating_system = OperatingSystem.Other)
 {
     Name      = name;
     Year      = year;
     _Paradigm = new List <Paradigm>()
     {
         paradigm
     };
     _Typing = new List <Typing>()
     {
         typing
     };
     _Level = new List <Level>()
     {
         level
     };
     _OperatingSystem = new List <OperatingSystem>()
     {
         operating_system
     };
 }
コード例 #10
0
 public Skill(int id, string name, string description, SkillUnlockType unlockType, Paradigm requiredParadigm, int powerCost, float chargeTime, float attackRating,
              float defenseRating, int abilityAggro, EnemyTargeting enemyTargeting, StatusEffect enemyStatusEffect, float enemyStatusEffectDuration, PartyTargeting partyTargeting,
              StatusEffect partyStatusEffect, float partyStatusEffectDuration)
 {
     this.id                        = id;
     this.name                      = name;
     this.description               = description;
     this.unlockType                = unlockType;
     this.requiredParadigm          = requiredParadigm;
     this.powerCost                 = powerCost;
     this.chargeTime                = chargeTime;
     this.attackRating              = attackRating;
     this.defenseRating             = defenseRating;
     this.abilityAggro              = abilityAggro;
     this.enemyTargeting            = enemyTargeting;
     this.enemyStatusEffect         = enemyStatusEffect;
     this.enemyStatusEffectDuration = enemyStatusEffectDuration;
     this.partyTargeting            = partyTargeting;
     this.partyStatusEffect         = partyStatusEffect;
     this.partyStatusEffectDuration = partyStatusEffectDuration;
     //icon = Resources.Load<Sprite>("Skill Icons/" + name);
 }
コード例 #11
0
ファイル: ParadigmGeneratorA.cs プロジェクト: ExShini/workRep
 public List<Paradigm> GetDeclinationAdjectivesAndNounWithDash_WithParam(string phrase)
 {
     // входные данные - набор прилаг и сущ в ед.ч. им. п. только из кириллических символов.
     // выходные - ед.ч.. Согласованно склоняются первое существительное и все прилагательные до него.
     // генерируемые парадигмы фразы, содержащей тире и разомкнутые дефисы(значения вида "Усть - Янский район", "Усть -Янский район"), 
     //  совпадают по символьному составу с парадигмой значений, имеющих в своём составе дефис (значения вида "Усть-Янский район") 
     List<Dash> ListDash = new List<Dash>();
     int pos = 0;
     foreach (Match match in Regex.Matches(phrase, @"([ ]?)([–—-])([ ]?)", RegexOptions.IgnoreCase))
     {
         pos++;  
         ListDash.Add(new Dash(match.Groups[1].Value, match.Groups[2].Value, match.Groups[3].Value));
     } 
     List<Paradigm> ListParadigm = new List<Paradigm>();
     phrase = PrepareData(phrase);
     phrase = Regex.Replace(phrase, @"[ ]?[–—-][ ]?", "-", RegexOptions.IgnoreCase);
     foreach (Paradigm par in GetDeclinationAdjectivesAndNoun_WithParam(phrase))
     {
         Paradigm newPar = new Paradigm(par);
         // обработка дефисов
         pos = 0;
         int lastIndex = 0;
         string word = string.Empty;
         foreach (Match match in Regex.Matches(par.word, @"[-]", RegexOptions.IgnoreCase))
         {
             if (pos == ListDash.Count)
                 break;
             word += par.word.Substring(lastIndex, match.Index - lastIndex) + ListDash[pos].leftSpace + ListDash[pos].dash + ListDash[pos].rightSpace;
             lastIndex = match.Index + 1;
             pos++; 
         }
         newPar.word = word + par.word.Substring(lastIndex);
         ListParadigm.Add(newPar);
     }
     return ListParadigm;
 }