当前位置: 首页>>代码示例>>C#>>正文


C# Person.ConvincePersonSuccess方法代码示例

本文整理汇总了C#中GameObjects.Person.ConvincePersonSuccess方法的典型用法代码示例。如果您正苦于以下问题:C# Person.ConvincePersonSuccess方法的具体用法?C# Person.ConvincePersonSuccess怎么用?C# Person.ConvincePersonSuccess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameObjects.Person的用法示例。


在下文中一共展示了Person.ConvincePersonSuccess方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: HandleChallengeResult

        internal void HandleChallengeResult(TroopDamage damage, int result, Troop sourceTroop, Person sourcePerson, Troop destinationTroop, Person destinationPerson, GameScenario scenario)
        {
            scenario.GameScreen.TroopPersonChallenge(result, sourceTroop, sourcePerson, destinationTroop, destinationPerson);

            switch (result)
            {
                case 1: //P1武将胜利
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson, "被打下馬");
                    damage.SourceMoraleChange += 20;
                    damage.DestinationMoraleChange -= 20;
                    damage.SourceCombativityChange += 20;
                    damage.DestinationCombativityChange -= 20;  //第2只军队战意下降
                    break;
                case 2: //2:P2武将胜利
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, destinationPerson, sourcePerson, "被打下馬");
                    damage.SourceMoraleChange -= 20;
                    damage.DestinationMoraleChange += 20;
                    damage.SourceCombativityChange -= 20;
                    damage.DestinationCombativityChange += 20;
                    break;
                case 3: //3:P1武将被杀
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, destinationPerson, sourcePerson, "被擊殺");
                    this.challengePersonDie(sourcePerson,sourceTroop, destinationPerson);
                    damage.SourceMoraleChange -= 30;
                    damage.DestinationMoraleChange += 30;
                    damage.SourceCombativityChange -= 30;
                    damage.DestinationCombativityChange += 30;
                    break;
                case 4: //4:P2武将被杀
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson, "被擊殺");
                    this.challengePersonDie(destinationPerson, destinationTroop, sourcePerson);
                    damage.SourceMoraleChange += 30;
                    damage.DestinationMoraleChange -= 30;
                    damage.SourceCombativityChange += 30;
                    damage.DestinationCombativityChange -= 30;
                    break;
                case 5: //5:P1武将逃跑
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, destinationPerson, sourcePerson, "逃跑");
                    damage.SourceMoraleChange -= 20;
                    damage.DestinationMoraleChange += 20;
                    break;
                case 6: //6:P2武将逃跑
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson, "逃跑");
                    damage.SourceMoraleChange += 20;
                    damage.DestinationMoraleChange -= 20;
                    break;
                case 7: //7、P1武将被俘虏
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, destinationPerson, sourcePerson, "被俘虜");
                    destinationTroop.CatchCaptiveFromTroop(sourcePerson);
                    sourceTroop.RefreshAfterLosePerson();
                    damage.SourceMoraleChange -= 20;
                    damage.DestinationMoraleChange += 20;
                    damage.SourceCombativityChange -= 20;
                    damage.DestinationCombativityChange += 20;
                    break;
                case 8: //8、P2武将被俘虏
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson, "被俘虜");
                    sourceTroop.CatchCaptiveFromTroop(destinationPerson);
                    destinationTroop.RefreshAfterLosePerson();
                    damage.SourceMoraleChange += 20;
                    damage.DestinationMoraleChange -= 20;
                    damage.SourceCombativityChange += 20;
                    damage.DestinationCombativityChange -= 20; 
                    break;
                case 9: //9、P1武将被说服
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, destinationPerson, sourcePerson, "被說服");
                    destinationPerson.ConvincePersonSuccess(sourcePerson);
                    damage.SourceCombativityChange -= 30;
                    damage.DestinationCombativityChange += 30;
                    break;
                case 10: //10、P2武将被说服
                    sourcePerson.Scenario.YearTable.addChallengeEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson, "被說服");
                    sourcePerson.ConvincePersonSuccess(destinationPerson);
                    damage.SourceCombativityChange += 30;
                    damage.DestinationCombativityChange -= 30; 
                    break;
                case -1: //-1:平局
                    sourcePerson.Scenario.YearTable.addChallengeDrawEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson);
                    break;
                case -2: //-2:平局:P1武将被杀
                    sourcePerson.Scenario.YearTable.addChallengeDrawKilledEntry(sourcePerson.Scenario.Date, destinationPerson, sourcePerson);
                    this.challengePersonDie(sourcePerson, sourceTroop, destinationPerson);
                    break;
                case -3: //-3:平局:P2武将被杀
                    sourcePerson.Scenario.YearTable.addChallengeDrawKilledEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson);
                    this.challengePersonDie(destinationPerson, destinationTroop, sourcePerson);
                    break;
                case -4: //-4:平局:双方武将被杀
                    sourcePerson.Scenario.YearTable.addChallengeDrawBothKilledEntry(sourcePerson.Scenario.Date, sourcePerson, destinationPerson);
                    this.challengePersonDie(sourcePerson, sourceTroop, destinationPerson);
                    this.challengePersonDie(destinationPerson, destinationTroop, sourcePerson);
                    break;
            }


        }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:96,代码来源:Challenge.cs


注:本文中的GameObjects.Person.ConvincePersonSuccess方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。