Example #1
0
 public Tower(TowerStats[] tStats, WeaponStats[] wStats, MEDIA_ID textureID, Vector2 startPosition, TowerTypes type)
 {
     towerStats     = tStats;
     weaponStats    = wStats;
     Level          = 0;
     NextFire       = 0;
     this._position = startPosition;
     Type           = type;
     TextureID      = textureID;
 }
Example #2
0
 public Tower(TowerStats[] tStats, WeaponStats[] wStats, MEDIA_ID textureID, Vector2 startPosition, TowerTypes type)
 {
     towerStats = tStats;
     weaponStats = wStats;
     Level = 0;
     NextFire = 0;
     this._position = startPosition;
     Type = type;
     TextureID = textureID;
 }
Example #3
0
        /// <summary>
        /// Creep instance constructor.
        /// </summary>
        /// <param name="stats">A dictionary of stats for this instance.</param>
        /// <param name="position">The spawning position.</param>
        /// <param name="textureID">The MEDIA_ID for this creep's texture.</param>
        public Creep(CreepTypeData creepData, Vector2 position, MEDIA_ID textureID)
        {
            CurrentDebuffs = new List<Debuff>();
            this.CenterPosition = new Vector2(position.X , position.Y);
            this.TextureID = textureID;

            DistanceTravelled = 0;

            Rotation = 0;

            this.stats = new Dictionary<CreepStats, int>();
            this.stats.Add(CreepStats.Width, creepData.Width);
            this.stats.Add(CreepStats.Height, creepData.Height);
            this.stats.Add(CreepStats.Health, creepData.Health);
            this.stats.Add(CreepStats.DamageToPlayer, creepData.DamageToPlayer);
            this.stats.Add(CreepStats.Speed, creepData.Speed);
            this.ScoreValue = creepData.Health;
        }
Example #4
0
        /// <summary>
        /// Creep instance constructor.
        /// </summary>
        /// <param name="stats">A dictionary of stats for this instance.</param>
        /// <param name="position">The spawning position.</param>
        /// <param name="textureID">The MEDIA_ID for this creep's texture.</param>
        public Creep(CreepTypeData creepData, Vector2 position, MEDIA_ID textureID)
        {
            CurrentDebuffs      = new List <Debuff>();
            this.CenterPosition = new Vector2(position.X, position.Y);
            this.TextureID      = textureID;

            DistanceTravelled = 0;

            Rotation = 0;

            this.stats = new Dictionary <CreepStats, int>();
            this.stats.Add(CreepStats.Width, creepData.Width);
            this.stats.Add(CreepStats.Height, creepData.Height);
            this.stats.Add(CreepStats.Health, creepData.Health);
            this.stats.Add(CreepStats.DamageToPlayer, creepData.DamageToPlayer);
            this.stats.Add(CreepStats.Speed, creepData.Speed);
            this.ScoreValue = creepData.Health;
        }
Example #5
0
        public static Texture2D GetTexture(MEDIA_ID mediaId)
        {
            if (null == Content)
            {
                throw new ContentNotDefinedException();
            }

            if (textures.ContainsKey(mediaId))
            {
                return(textures[mediaId]);
            }

            Texture2D newTexture = Content.Load <Texture2D>(assetNames[(int)mediaId]);

            textures.Add(mediaId, newTexture);

            return(newTexture);
        }
Example #6
0
 public BasicMenu(MEDIA_ID textureId, Screens next)
 {
     this.textureId = textureId;
     this.next = next;
 }
Example #7
0
 public BasicMenu(MEDIA_ID textureId, Screens next)
 {
     this.textureId = textureId;
     this.next      = next;
 }
        public static Texture2D GetTexture(MEDIA_ID mediaId)
        {
            if(null == Content)
            {
                throw new ContentNotDefinedException();
            }

            if (textures.ContainsKey(mediaId))
            {
                return textures[mediaId];
            }

            Texture2D newTexture = Content.Load<Texture2D>(assetNames[(int)mediaId]);
            textures.Add(mediaId, newTexture);

            return newTexture;
        }
Example #9
0
 /// <summary>
 /// Creep instance constructor.
 /// </summary>
 /// <param name="stats">A dictionary of stats for this instance.</param>
 /// <param name="position">The spawning position.</param>
 /// <param name="textureID">The MEDIA_ID for this creep's texture.</param>
 /// <param name="path">The index of the path to follow.</param>
 /// <param name="startingWaypoint">The waypoint to spawn at.</param>
 public Creep(CreepTypeData creepData, Vector2 position, MEDIA_ID textureID, int path, int startingWaypoint)
     : this(creepData, position, textureID)
 {
     this._path = path;
     this._nextWaypoint = startingWaypoint;
 }
Example #10
0
 /// <summary>
 /// Creep instance constructor.
 /// </summary>
 /// <param name="stats">A dictionary of stats for this instance.</param>
 /// <param name="position">The spawning position.</param>
 /// <param name="textureID">The MEDIA_ID for this creep's texture.</param>
 /// <param name="path">The index of the path to follow.</param>
 /// <param name="startingWaypoint">The waypoint to spawn at.</param>
 public Creep(CreepTypeData creepData, Vector2 position, MEDIA_ID textureID, int path, int startingWaypoint)
     : this(creepData, position, textureID)
 {
     this._path         = path;
     this._nextWaypoint = startingWaypoint;
 }