コード例 #1
0
ファイル: Wave.cs プロジェクト: behindcurtain3/schismTDserver
        public Wave(GameCode gc, Game game, Player player, Player opponent)
        {
            ID = Guid.NewGuid().ToString();
            mCtx = gc;
            mGame = game;
            mPlayer = player;
            mOpponent = opponent;

            mWaveTimeWindow = Settings.WAVE_WINDOW;
            mWaveTimeElapsed = 0;
            mTimeToNextSpawn = 0;

            Points = 24;

            Started = false;
            SpawnQueue = new Queue<Creep>();
            SpawnTimers = new Dictionary<Creep, long>();
            CreepTypes = new List<String>();

            if (mPlayer == mGame.Black)
            {
                StartingPosition = mGame.Board.WhiteSpawn.Position;
            }
            else
            {
                StartingPosition = mGame.Board.BlackSpawn.Position;
            }
        }
コード例 #2
0
        public Tower(Game g, Player p, Player opponent, Vector2 pos)
        {
            mGame = g;
            Player = p;
            mOpponent = opponent;

            Width = Settings.BOARD_CELL_WIDTH;
            Height = Settings.BOARD_CELL_HEIGHT;
            Position = pos;
            Cost = Costs.BASIC;

            FireRate = 1800; // Settings.DEFAULT_FIRE_RATE * 3;
            Range = Settings.DEFAULT_RANGE * 2;
            Damage = 30;
            SellValue = 7;

            EffectedFireRate = FireRate;
            EffectedDamage = Damage;
            EffectedRange = Range;

            mUpdatedRange = Range;
            mUpdatedRate = FireRate;
            mUpdatedDamage = Damage;

            FireRatePosition = mFireRate;

            StaticTarget = null;
            Enabled = true;
        }
コード例 #3
0
        public SniperTower(Game g, Player p, Player opponent, Vector2 pos)
            : base(g, p, opponent, pos)
        {
            FireRate = 1500;
            Range = Settings.DEFAULT_RANGE * 12;
            Damage = Settings.DEFAULT_DAMAGE * 25;
            SellValue = 210;

            Type = Tower.SNIPER;
        }
コード例 #4
0
        public AOESlowTower(Game g, Player p, Player opponent, Vector2 pos)
            : base(g, p, opponent, pos)
        {
            FireRate = 75;
            Range = Settings.DEFAULT_RANGE * 2;
            Damage = 0;
            SellValue = 210;

            Type = Tower.SLOW;
        }
コード例 #5
0
        public SeedTower(Game g, Player p, Player opponent, Vector2 pos)
            : base(g, p, opponent, pos)
        {
            FireRate = Settings.DEFAULT_FIRE_RATE * 30; // every 9 seconds
            Range = Settings.DEFAULT_RANGE * 3;
            Damage = Settings.DEFAULT_DAMAGE * 10;
            SellValue = (int)(Costs.SEED * Costs.RESELL_VALUE);

            Type = Tower.SEED;
        }
コード例 #6
0
        public PulseTower(Game g, Player p, Player opponent, Vector2 pos)
            : base(g, p, opponent, pos)
        {
            FireRate = Settings.DEFAULT_FIRE_RATE * 3;
            Range = Settings.DEFAULT_RANGE * 1.25f;
            Damage = Settings.DEFAULT_DAMAGE * 15;
            SellValue = 210;

            Type = Tower.PULSE;
        }
コード例 #7
0
        public PulseProjectile(Game game, Vector2 position, Player target, int damage, float range)
            : base(game, position, null, damage)
        {
            mOpponent = target;
            mRadius = 0.0f;
            mRange = range;
            Velocity = 5 * Settings.BOARD_CELL_WIDTH;

            Type = "Pulse";
            Ready = false;
        }
コード例 #8
0
        public DamageBoostTower(Game g, Player p, Player opponent, Vector2 pos)
            : base(g, p, opponent, pos)
        {
            FireRate = 0;
            Range = 0;
            Damage = 0;
            SellValue = 210;

            EffectedFireRate = FireRate;
            EffectedDamage = Damage;
            EffectedRange = Range;

            Type = Tower.DAMAGE_BOOST;
        }
コード例 #9
0
        public SpellTower(Game g, Player p, Player opponent, Vector2 pos)
            : base(g, p, opponent, pos)
        {
            FireRate = 750;
            Range = 100;// Settings.DEFAULT_RANGE * 3;
            Damage = 70;
            SellValue = 75;

            EffectedFireRate = FireRate;
            EffectedDamage = Damage;
            EffectedRange = Range;

            Type = Tower.SPELL;
        }
コード例 #10
0
        public RapidFireTower(Game g, Player p, Player opponent, Vector2 pos)
            : base(g, p, opponent, pos)
        {
            FireRate = 200;
            Range = 100;// Settings.DEFAULT_RANGE * 3;
            Damage = 20;
            SellValue = 75;

            EffectedFireRate = FireRate;
            EffectedDamage = Damage;
            EffectedRange = Range;

            Type = Tower.RAPID_FIRE;
        }
コード例 #11
0
        public Projectile(Game game, Vector2 position, Creep target, int damage = Settings.DEFAULT_DAMAGE)
        {
            mGame = game;

            Width = 5;
            Height = 5;

            // The position passed in is the center of the tower, we need to recalc the projectiles position so the center is aligned with the center of the tower
            Position = new Vector2(position.X - Width / 2, position.Y - Height / 2);
            Target = target;

            Velocity = 200;
            Damage = damage;

            Type = "Basic";

            Ready = false;
        }
コード例 #12
0
        public void reset(Game game)
        {
            mGame = game;
            Mana = Settings.DEFAULT_MANA;
            Life = Settings.DEFAULT_LIFE;

            DamageDealt = 0;

            lock(Towers)
                Towers.Clear();
            lock(Creeps)
                Creeps.Clear();

            OnDeckWaves = new List<Wave>();
            QueuedWaves = new Queue<Wave>();
            ActiveWaves = new List<Wave>();
            WavePosition = 0;

            ChiBlastCost = Settings.CHI_BLAST_INITIAL;
            ChiBlastUses = 0;

            StaticTarget = "";
        }
コード例 #13
0
 public SlowProjectile(Game game, Vector2 position, Creep target)
     : base(game, position, target, 0)
 {
     Type = "Slow";
 }
コード例 #14
0
 public SniperProjectile(Game game, Vector2 position, Creep target, int damage)
     : base(game, position, target, damage)
 {
     Type = "Sniper";
 }
コード例 #15
0
 public RapidFireProjectile(Game game, Vector2 position, Creep target, int damage)
     : base(game, position, target, damage)
 {
     Type = "RapidFire";
 }