public Tower(Rectangle towerBase, int health) { mWorld = DefenderWorld.Instance; mTowerBase = towerBase; mCenter = new Vector2(towerBase.Width / 2 + towerBase.X, towerBase.Height / 2 + towerBase.Y); mHealth = health; }
public Arrow( DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision ) : base( world, position, target, dmg, speed, imprecision ) { texProjectile = world.texArrow; mHitAnimation = "red puff"; mMissAnimation = "dirt puff"; SetupProjectile(); CalculateMovement(); }
public Arrow(DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision) : base(world, position, target, dmg, speed, imprecision) { texProjectile = world.texArrow; mHitAnimation = "red puff"; mMissAnimation = "dirt puff"; SetupProjectile(); CalculateMovement(); }
public Projectile(DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision) { mWorld = world; mTarget = target; mPosition = position; mDmg = dmg; mSpeed = speed; mImprecision = imprecision; texProjectile = world.texArrow; }
public Bullet(DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision) : base(world, position, target, dmg, speed, imprecision) { texProjectile = world.texBullet; mMissAnimation = "dirt puff"; mHitAnimation = "red puff"; mAdditive = true; mScale = 0.4f; mDmgType = EUnitDamageType.Pierce; mColor = new Color(255, 150, 150, 255); CalculateMovement(); SetupProjectile(); }
public override void Press() { base.Press(); DefenderWorld world = DefenderWorld.Instance; if (world.Interface.SelectedTower == null || world.Interface.SelectedTower.Level >= Tower.MAX_LVL) { return; } if (world.Status.Money >= world.Interface.SelectedTower.UpgradeCost) { world.Status.Money -= world.Interface.SelectedTower.Upgrade(); } }
public Pulse(DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision) : base(world, position, target, dmg, speed, imprecision) { texProjectile = world.texBullet; mMissAnimation = "redCircle"; mHitAnimation = "pulseHit"; mDmgType = EUnitDamageType.Energy; mAcceleration = 0; mAdditive = true; mScale = 0.7f; mColor = new Color(255, 60, 60, 255); CalculateMovement(); SetupProjectile(); }
public Concussion(DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision, int netSize, float slowEffect, int duration) : base(world, position, target, dmg, speed, imprecision) { texProjectile = world.texConcussion; mMissAnimation = "concussion"; mHitAnimation = "concussion"; mSplash = true; mDmgType = EUnitDamageType.Energy; mNetSize = netSize; mSlowEffect = slowEffect; mDuration = duration; CalculateMovement(); SetupProjectile(); }
public Flame(DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision, int sDmg, int sRange, float acceleration) : base(world, position, target, dmg, speed, imprecision) { texProjectile = world.texFire; mHitAnimation = "explosion3"; mMissAnimation = mHitAnimation; mDmgType = EUnitDamageType.Burn; mSplash = true; mSplashDmg = sDmg; mSplashRange = sRange; mAcceleration = acceleration; SetupProjectile(); CalculateMovement(); }
public Shell(DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision, int sDmg, int sRange, float acceleration, bool homing) : base(world, position, target, dmg, speed, imprecision) { texProjectile = world.texRocket; mHitAnimation = "explosion1"; mHitSound = "RndExplosion"; mMissAnimation = mHitAnimation; mDmgType = EUnitDamageType.Explosive; mMaxSpeed = 15; mSplash = true; mSplashDmg = sDmg; mSplashRange = sRange; mHoming = homing; mAcceleration = acceleration; SetupProjectile(); CalculateMovement(); }
public Projectile( DefenderWorld world, Vector2 position, Unit target, int dmg, float speed, int imprecision ) { mWorld = world; mTarget = target; mPosition = position; mDmg = dmg; mSpeed = speed; mImprecision = imprecision; texProjectile = world.texArrow; }
public Tower(Rectangle towerBase, int health) { mWorld = DefenderWorld.Instance; mTowerBase = towerBase; mCenter = new Vector2(towerBase.Width / 2 + towerBase.X, towerBase.Height / 2 + towerBase.Y); mHealth = health; }