• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Battle类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Battle的典型用法代码示例。如果您正苦于以下问题:C# Battle类的具体用法?C# Battle怎么用?C# Battle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Battle类属于命名空间,在下文中一共展示了Battle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AttackCustomWindow

 public AttackCustomWindow(Battle battle)
 {
     InitializeComponent();
     _battle = battle;
     comboBox1.ItemsSource = _battle.Members;
     comboBox2.ItemsSource = _battle.Members;
 }
开发者ID:macper,项目名称:Helper,代码行数:7,代码来源:AttackCustomWindow.xaml.cs


示例2: BattleScreen

        /// <summary>
        /// Constructor.
        /// </summary>
        public BattleScreen(Battle.BattleInfo battleInfo)
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            BattleInfo = battleInfo;
        }
开发者ID:LaudableBauble,项目名称:Insipidus,代码行数:10,代码来源:BattleScreen.cs


示例3: Think

        public Think(Battle battle)
            : base(battle)
        {
            CurrentThinkActionType = ThinkActionType.None;
            currentThinkAction = null;
            CurrentOptionNameIndex = 0;
            MenuOptions = null;
            inOuterMenu = true;
            CurrentOuterMenuOptionIndex = 0;

            weaponMenuOptions = new Dictionary<CharacterClass, List<ThinkMenuOption>>();
            foreach (CharacterClass characterClass in Enum.GetValues(typeof(CharacterClass)))
                weaponMenuOptions.Add(characterClass, new List<ThinkMenuOption>());
            shieldMenuOptions = new List<ThinkMenuOption>();
            itemMenuOptions = new List<ThinkMenuOption>();

            Actions = new List<ThinkAction>(battle.PlayerParty.Count);

            inputButtonListener = new InputButtonListener(new Dictionary<InputButton, ButtonEventHandlers> {
                { InputButton.Up, new ButtonEventHandlers(down: upHandler) },
                { InputButton.Down, new ButtonEventHandlers(down: downHandler) },
                { InputButton.Left, new ButtonEventHandlers(down: leftHandler) },
                { InputButton.Right, new ButtonEventHandlers(down: rightHandler) },
                { InputButton.A, new ButtonEventHandlers(up: selectOption) },
                { InputButton.B, new ButtonEventHandlers(up: cancelAction) }
            });
        }
开发者ID:supermaximo93,项目名称:SuperFantasticSteampunk,代码行数:27,代码来源:Think.cs


示例4: Encounter

        public override void Encounter()
        {   
            int level = rng.Next(3, 5);
            int species = rng.Next(1, 101);

            Battle battle = new Battle();

            if (species > 65)
            {
                battle.Wild(generator.Create("Rattata", level));
            }
            else if (species > 30)
            {
                battle.Wild(generator.Create("Pidgey", level));
            }
            else if (species > 15)
            {
                battle.Wild(generator.Create("Weedle", level));
            }
            else
            {
                battle.Wild(generator.Create("Caterpie", level));
            }

            return;
        }
开发者ID:tasosgretsistas,项目名称:pokemontextgame,代码行数:26,代码来源:Route2N.cs


示例5: Interact

        public override void Interact(Entity other)
        {
            if (other is Combatant) {
                Combatant otherCombatant = (Combatant)other;

                // If interacting with an enemy
                if (!Team.IsFriendly(otherCombatant.Team)) {
                    IsEngaged = true;

                    // Join the enemy's battle, or create a new one
                    if (otherCombatant.battle == null) {
                        battle = new Battle();
                    } else {
                        battle = otherCombatant.battle;
                    }

                    // Add fighters to the battle
                    foreach (Fighter f in Fighters) {
                        battle.AddFighter(f);
                    }

                    // We want the battle to notify us when it ends,
                    // so we can disengage
                    battle.Ended += OnBattleEnd;

                    // Notify
                    JoinedBattle(this, new CombatantEventArgs {
                        Battle = battle
                    });
                }
            }
        }
开发者ID:RolandMQuiros,项目名称:LostGenerationOld,代码行数:32,代码来源:Combatant.cs


示例6: Start

	// Use this for initialization
    void Start()
    {
        //Dictionary<Storage.UnitTypes, uint> dUnits = new Dictionary<Storage.UnitTypes, uint>();
        //Dictionary<Storage.BuildingTypes, uint> dBuildings = new Dictionary<Storage.BuildingTypes, uint>();
        missionsToComplete = 0;
        GameInformation info = GameObject.Find("GameInformationObject").GetComponent<GameInformation>();
        battle = info.GetBattle();
        foreach (Battle.MissionDefinition mission in battle.GetMissions())
        {
            switch (mission.purpose)
            {
                case Battle.MissionType.DESTROY:
                    switch (mission.target)
                    {
                        case Storage.EntityType.UNIT:
                            destroyedUnitsWinners.Add(mission.targetType.unit, 0);
                            //dUnits.Add(mission.targetType.unit, mission.amount);
                            missionsToComplete++;
                            break;
                        case Storage.EntityType.BUILDING:
                            destroyedBuildingsWinners.Add(mission.targetType.building, 0);
                            //dBuildings.Add(mission.targetType.building, mission.amount);
                            missionsToComplete++;
                            break;
                    }
                    break;
            }
        }
    }
开发者ID:srferran,项目名称:ES2015A,代码行数:30,代码来源:MissionController.cs


示例7: Encounter

        public override void Encounter()
        {   
            int level = rng.Next(3, 6);
            int level2 = rng.Next(4, 7);
            int species = rng.Next(1, 101);

            Battle battle = new Battle();

            if (species > 75)
            {
                battle.Wild(generator.Create("Caterpie", level));
            }
            else if (species > 50)
            {
                battle.Wild(generator.Create("Weedle", level));
            }
            else if (species > 30)
            {
                battle.Wild(generator.Create("Pidgey", level));
            }
            else if (species > 15)
            {
                battle.Wild(generator.Create("Metapod", level2));
            }
            else
            {
                battle.Wild(generator.Create("Kakuna", level2));
            }
        }
开发者ID:tasosgretsistas,项目名称:pokemontextgame,代码行数:29,代码来源:ViridianForestPart1.cs


示例8: TryPerform

        public bool TryPerform(Battle context)
        {
            Debug.Assert(!IsRunning);

            if (IsBeforeDelaying)
            {
                Debug.LogError("now before delaying.");
                return false;
            }

            if (_boss.IsDead)
                return false;

            if (_boss.Data.Skills.Empty())
            {
                Debug.LogError("has no skill.");
                return false;
            }

            var data = SampleOrGetDebugSkillData(context);
            if (data == null)
                return false;

            Running = _skillFactory.Create(data, context, _boss);
            Running.OnStop += OnStop;
            Running.Start();
            Events.Boss.OnSkillStart.CheckAndCall(_boss, Running);
            return true;
        }
开发者ID:choihb,项目名称:snugdc-project-sprpg,代码行数:29,代码来源:BossAi.cs


示例9: OnExecuteCommand

 public void OnExecuteCommand(Battle.MessageConstants.ExecuteCommandHook hook)
 {
     var executer = AllPartyManager.Instance.ActiveTimeMaxBattleCharacter;
     var selectCommandData = executer.SelectCommandData;
     selectCommandData.Impact.Damage = CalcurateDamage.Range( this.data.PowerMinToInt, this.data.PowerMaxToInt );
     selectCommandData.Impact.Target.TakeDamage( selectCommandData.Impact.Damage );
 }
开发者ID:hiroki-kitahara,项目名称:RPG,代码行数:7,代码来源:OnExecuteCommandRangeAttackFromMagicData.cs


示例10: CreateUser

 public Regulus.Project.Crystal.Game.Core CreateUser(Regulus.Remoting.ISoulBinder binder, IStorage storage, IMap zone , Battle.IZone battle)
 {
     var core = new Regulus.Project.Crystal.Game.Core(binder, storage, zone, battle);
     _Users.AddFramework(core);
     core.InactiveEvent += () => { _Users.RemoveFramework(core); };
     return core;
 }
开发者ID:jiowchern,项目名称:KeysCore,代码行数:7,代码来源:Hall.cs


示例11: MainWindow

 public MainWindow(Battle.Core.BattlelordsSession session)
     : base("Battle")
 {
     this.session = session;
     this.build();
     this.DeleteEvent += HandleHandleDeleteEvent;
 }
开发者ID:sgtnasty,项目名称:battle,代码行数:7,代码来源:MainWindow.cs


示例12: Main

        static void Main( string[] args )
        {
            Messenger.Input = Console.ReadLine;
            Messenger.Message.Subscribe( MessageWriter );

            var hero = new HeroBattler( Messenger, "勇者", 20, 20 );
            var witch = new HeroBattler( Messenger, "魔女", 18, 18 );
            var enemy = new Battler( Messenger, "スキュラ", 20, 20 );
            var enemy2 = new Battler( Messenger, "モノアイ", 16, 16 );

            var atackSkill = new Skill( "攻撃", 1, 1, Atack );
            var pluralAtackSkill = new Skill( "連続攻撃", 1, 1, PluralAtack );
            var starSkill = new Skill( "星を落とす魔法", 1, 3, StarMagic );
            var fireSkill = new Skill( "炎の剣", 2, 1, FireSlash );

            hero.AddSkill( atackSkill );
            hero.AddSkill( pluralAtackSkill );
            hero.AddSkill( fireSkill );
            witch.AddSkill( atackSkill );
            witch.AddSkill( starSkill );
            enemy.AddSkill( atackSkill );
            enemy.AddSkill( pluralAtackSkill );
            enemy2.AddSkill( atackSkill );

            var battle = new Battle( Messenger, new[] { hero, witch }, new[] { enemy, enemy2 } );
            var sub = battle.Run().ToMicrothread();
            while( sub.Current == BattleState.Fighting )
            {
                sub.Yield();
            }

            Console.WriteLine( "End" );
            Console.ReadLine();
        }
开发者ID:NumAniCloud,项目名称:BattlePrompt,代码行数:34,代码来源:Program.cs


示例13: NewCharacterWindow

 public NewCharacterWindow(Battle.Core.BattlelordsSession session)
 {
     this.session = session;
     this.SetDefaultSize(400,300);
     this.SetPosition(WindowPosition.Center);
     this.build();
 }
开发者ID:sgtnasty,项目名称:battle,代码行数:7,代码来源:NewCharacterWindow.cs


示例14: Click

    /*
    public void Click(){
        battle = GetComponentInParent<Battle>();
        Debug.Log("click Atk");
        //battle.act1 = Accion.CreateAccion("AttackGeneric");

        battle.act1 = Accion.CreateAccion(battle.userMon.GetMov(battle.userMon.lv)[0],battle.opoMon);
    }*/
    public void Click()
    {
        battle = GetComponentInParent<Battle>();
        battle.user.nroMovimiento = 0;
        battle.user.target = battle.opoMon;
        battle.user.clicks = accionesEntrenador.Ataque;
    }
开发者ID:Lex92,项目名称:Programacion-3,代码行数:15,代码来源:AttackBtn.cs


示例15: Awake

 ///////////////////////////////////////////////////////////////////////////////
 // Function
 ///////////////////////////////////////////////////////////////////////////////
 new void Awake() {
     base.Awake();
     levelName = GameLevel.Battle.ToString();
     instance = this;
     input = GetComponent<GameInput>();
     input.enabled = false;
 }
开发者ID:GavenZhou,项目名称:ProjectDemo,代码行数:10,代码来源:Battle.cs


示例16: AttackWindow

 public AttackWindow(Character attacker, Character defender, Battle battle)
 {
     InitializeComponent();
     _attacker = attacker;
     _defender = defender;
     _battle = battle;
     Refresh();
 }
开发者ID:macper,项目名称:Helper,代码行数:8,代码来源:AttackWindow.xaml.cs


示例17: createRaidColorCreater

		internal virtual RaidColorCreater createRaidColorCreater(Battle battle, IBattleTemplateService tempService)
		{
			int _stageId = battle.BattleSource.RaidStageId;
			Template.Auto.Raid.RaidStageTemplate _temp = tempService.getRaidStageTemp(_stageId);
			RaidColorCreater _creater = new RaidColorCreater(battle);
			_creater.build(_temp.ColorRate);
			return _creater;
		}
开发者ID:wuxin0602,项目名称:Nothing,代码行数:8,代码来源:RaidPVEBattleFactory.cs


示例18: DoDamageWindow

 public DoDamageWindow(Character target, Battle battle)
 {
     InitializeComponent();
     _target = target;
     _battle = battle;
     textBox1.Focus();
     textBox1.SelectAll();
 }
开发者ID:macper,项目名称:Helper,代码行数:8,代码来源:DoDamageWindow.xaml.cs


示例19: Awake

 void Awake()
 {
     _battle = this;
     StateMachine.RegediStateCallBack("Battle", "Round", StateCallBackType.TypeOnEnter, BattleRoundEnter);
     StateMachine.RegediStateCallBack("Round", "RoundStart", StateCallBackType.TypeOnEnter, BattleStartEnter);
     StateMachine.RegediStateCallBack("Round", "BeforeDamage", StateCallBackType.TypeOnEnter, RoundBeforeDamageEnter);
     Message.RegeditMessageHandle<string>("QuickBattle", SetPassFlag);
 }
开发者ID:shuitian,项目名称:pokemon_rpg,代码行数:8,代码来源:Battle.cs


示例20: OnExecuteCommand

        public void OnExecuteCommand(Battle.MessageConstants.ExecuteCommandHook hook)
        {
            this.Initialize();

            var selectCommandData = AllPartyManager.Instance.ActiveTimeMaxBattleCharacter.SelectCommandData;
            selectCommandData.SetTarget( this.targetCharacter );
            SetTargetCharacter();
        }
开发者ID:hiroki-kitahara,项目名称:RPG,代码行数:8,代码来源:OnExecuteCommandSetTargetAtGroup.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# BcpgOutputStream类代码示例发布时间:2022-05-24
下一篇:
C# BatteryType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap