コード例 #1
0
        public DrawerBattle(Game1 myGame, ContentManager content, InterfaceBattle myInterface) : base(myGame, content)
        {
            _myInterface = myInterface;

            _zoom = Constants.ZoomDefault;

            //_myMoveRangeCalculator = new MoveRangeCalculator(_currentMap);
            _currentMap = myGame.CurrentMap;

            Load_content();
        }
コード例 #2
0
 public Spell(Spells type, Creature agent, DrawerBattle drawer, InterfaceBattle myInterface,
              SpellTarget targetType, UInt16 range, UInt16 magnitude, UInt16 executionTime)
 {
     _type       = type;
     _agent      = agent;
     _map        = _agent.MapBattlemap;
     _drawer     = drawer;
     _interface  = myInterface;
     _targetType = targetType;
     //_spellEffects = spellEffects;
     _range         = range;
     _magnitude     = magnitude;
     _executionTime = executionTime;
 }
コード例 #3
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here

            this.IsMouseVisible = true;

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            _myInterfaceMenu   = new InterfaceStartMenu(this);
            _myDrawerStartMenu = new DrawerStartMenu(this, Content, _myInterfaceMenu);

            _randomator = new RandomStuff(907);

            _myInterface = new InterfaceBattle(this);
            _myDrawer    = new DrawerBattle(this, Content, _myInterface);

            base.Initialize();
        }
コード例 #4
0
 public MapGenerator(RandomStuff randomator, InterfaceBattle gameInterface, DrawerBattle drawer)
 {
     _randomator = randomator;
     _interface  = gameInterface;
     _drawer     = drawer;
 }
コード例 #5
0
 public SKillBasicAttackRanged(Creature agent, DrawerBattle drawer, InterfaceBattle myInterface,
                               SpellTarget targetType, UInt16 magnitude, UInt16 executionTime)
     : base(Spells.SkillRanged, agent, drawer, myInterface, targetType, agent.GetAttackRange(), magnitude, executionTime)
 {
 }
コード例 #6
0
 public SkillBasicAttackMelee(Creature agent, DrawerBattle drawer, InterfaceBattle myInterface,
                              SpellTarget targetType, UInt16 magnitude, UInt16 executionTime)
     : base(Spells.SkillMelee, agent, drawer, myInterface, targetType, 1, magnitude, executionTime)
 {
 }
コード例 #7
0
        private void CreateSpellForCreature(Creature agent, Spells type, DrawerBattle myDrawer, InterfaceBattle myInterface)
        {
            Spell newSpell = null;

            switch (type)
            {
            case Spells.SkillMelee:
                newSpell = new SkillBasicAttackMelee(agent, myDrawer, myInterface, SpellTarget.Hex, 1,
                                                     Constants.APActionCostsStandard[(sbyte)APCostTypes.AttackMelee]);
                break;

            case Spells.SkillRanged:     // FIX RANGE
                newSpell = new SKillBasicAttackRanged(agent, myDrawer, myInterface, SpellTarget.Hex, 1,
                                                      Constants.APActionCostsStandard[(sbyte)APCostTypes.AttackMelee]);
                break;
            }

            agent.SpellAdd(newSpell);
        }
コード例 #8
0
        /// <summary>
        /// Spawns the player on the 'ground' at 'startPoint'
        /// returns a reference to the Player so one can more easily take care of references.
        /// </summary>

        /*
         * public Creature SpawnPlayer(Coords startPoint)
         * {
         *  //Player player = new Player(this, startPoint, this.IssueCreatureID());
         *  //this.PlayerReference = player;
         *  return null;
         * }
         */
        public Creature CreateCreature(Coords startPoint, Team team, CreatureGenerator generator, Brain creatureBrain, DrawerBattle myDrawer, InterfaceBattle myInterface)
        {
            Creature newguy = new Creature(this, startPoint, (UInt16)this.IssueCreatureID(), team, generator, creatureBrain);

            team.MemberRegister(newguy);
            for (int i = 0; i < generator.SpellEndowment.Length; ++i)
            {
                CreateSpellForCreature(newguy, generator.SpellEndowment[i], myDrawer, myInterface);
            }
            return(newguy);
        }