Example #1
0
 ///<Summary>
 /// Character: Ashe
 /// This abilities shoots 7 arrows in a cone. Each arrow applies the Frost debuff upon hit.
 ///</Summary> 
 public Volley(Player player, FrostShot frostShot)
     : base(player)
 {
     cooldown = TimeSpan.FromSeconds(1);
     this.frostShot = frostShot;
     cost = 20;
     volleyData = new List<AreaOfEffectTracker>();
     Name = "Volley";
 }
Example #2
0
        public HawkShot(Player player)
            : base(player)
        {
            cooldown = TimeSpan.FromSeconds(6);
            timeSinceUsed = cooldown;

            hawk = new Entity(player.game);
            hawk.Shown = false;
            Name = "Hawk Shot";
        }
Example #3
0
        public FrostShot(Player player)
            : base(player)
        {
            cooldown = TimeSpan.FromSeconds(.5f);

            autoAttackAssetName = player.creature.autoAttackAssetName;
            frostAutoAttackAssetName = "AsheFrostArrow";
            Name = "Frost Shot";
            frostShot = new Buffs.FrostShot(player.creature);
        }
Example #4
0
 public Ashe(Player player)
     : base(player)
 {
 }
 ///<Summary>
 /// This ability shoots an arrow across the map which deals damage and stuns in an AoE upon hitting an enemy player.
 /// This ability shoots through walls and has a range that is larget than the map.
 /// The stun's duration increases based on the length of time since it was shot
 ///</Summary>
 public EnchantedCrystalArrow(Player player)
     : base(player)
 {
     Name = "Enchanted Crystal Arrow";
 }
Example #6
0
 public UserInput(Player player)
 {
     this.player = player;
 }
Example #7
0
 internal void Initialize(Player player)
 {
 }
Example #8
0
 public static Vector2 GetPlayerDisplayPosition(Player player)
 {
     return (player.cam.TargetPosition * 100 - player.cam.Position) + new Vector2(player.game.GraphicsDevice.Viewport.Width / 2, player.game.GraphicsDevice.Viewport.Height / 2) / player.cam.Zoom;
 }
Example #9
0
 public static Vector2 GetInputVector(Player player)
 {
     Vector2 characterPosition = LocationAnalysis.GetPlayerDisplayPosition(player);
     return new Vector2((Mouse.GetState().Y - characterPosition.Y), (Mouse.GetState().X - characterPosition.X));
 }
Example #10
0
 ///<Summary>
 /// This class holds a collection of static methods that determine information about a player's location/surroundings
 ///</Summary>
 public static Entity.SpriteDirection GetInputDirection(Player player)
 {
     float inputAngle = GetInputAngle(player);
     if (inputAngle < Math.PI / 2 && inputAngle > -Math.PI / 2)
         return Entity.SpriteDirection.Right;
     return Entity.SpriteDirection.Left;
 }
Example #11
0
 public static float GetInputAngle(Player player)
 {
     Vector2 characterPosition = LocationAnalysis.GetPlayerDisplayPosition(player);
     return (float)Math.Atan2((double)(Mouse.GetState().Y - characterPosition.Y), (double)(Mouse.GetState().X - characterPosition.X));
 }
Example #12
0
 public void MoveToCursor(Player player)
 {
     targetPosition = LocationAnalysis.GetMouseGamePosition(Game, player.cam);
     movementAngle = Vector2.Normalize(targetPosition - GamePosition);
     move = true;
 }
Example #13
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()
        {
            //Initialize Physics Objects
            world = new World(new Vector2(0, 20));
            debugViewXNA = new DebugViewXNA(world);
            debugViewXNA.AppendFlags(DebugViewFlags.Shape);
            debugViewXNA.AppendFlags(DebugViewFlags.AABB);
            debugViewXNA.AppendFlags(DebugViewFlags.CenterOfMass);
            debugViewXNA.AppendFlags(DebugViewFlags.DebugPanel);

            //Initialize Singleton Objects
            spriteBatch = new SpriteBatch(GraphicsDevice);
            Services.AddService(typeof(SpriteBatch), spriteBatch);
            font = Content.Load<SpriteFont>("myFont");
            staticEntities = new List<Entity>();

            //Set camera variables
            cam = new Camera2D(GraphicsDevice);
            cam.Zoom = 0.7f;
            Services.AddService(typeof(Camera2D), cam);
            //  cam.Zoom = 0.3f;

            //Initialize Entities
            player1 = new Player(this, ashe, cam, krypton);
            player2 = new DummyPlayer(this, ashe2, cam);

            //Initialize Characters, they must be created after the players but before player.Initialize()
            ashe = new Ashe(player1);
            ashe2 = new Ashe(player2);

            player2.Initialize(ashe2);
            player2.setTeam(Creature.Team.Red);

            player1.Initialize(ashe);
            player1.setTeam(Creature.Team.Blue);

            krypton.Initialize();
            //Initialize Test Objects

            base.Initialize();
        }
Example #14
0
 public Ability(Player player)
 {
     this.player = player;
     timeSinceUsed = TimeSpan.Zero;
 }
Example #15
0
 ///<Summary>
 /// Set variables and initialize objects. Player.creature is not initialized yet.
 ///</Summary>
 public Character(Player player)
 {
     this.player = player;
     abilities = new List<Ability>();
     SetStatistics();
 }