public Enemy(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, bool dropsPowerUp) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite) { mySquad = squad; m_dropsPowerUp = dropsPowerUp; }
public Option(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D ProjectileSprite, Player player, int initial_trail_pos) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, ProjectileSprite, null) { shootCooldown = rateoffire; continuousShootCooldown = continuousrateoffire; missileShootCooldown = 1500; m_depth -= 0.1f; m_player = player; m_initial_trail_pos = initial_trail_pos; int trail_pos = Math.Abs(m_player.m_trail_pos - m_initial_trail_pos) % TRAIL_SIZE; m_option_trail_pos = trail_pos; int[] optionAnimationFrames = { 85, 86 }; Animation optionAnimation = new Animation(PlayType.Loop, optionAnimationFrames, 5.0f); int[] optionAnimationFramesExploded = { 87 }; Animation optionAnimationExploded = new Animation(PlayType.Loop, optionAnimationFramesExploded, 5.0f); Dictionary <string, Animation> optionAnimations = new Dictionary <string, Animation>() { { "forward", optionAnimation }, { "up", optionAnimation }, { "down", optionAnimation }, { "exploded", optionAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteEnemies, optionAnimations, 5, 18); currAnimation = "forward"; }
public Ducker(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; m_dropsPowerUp = dropsPowerUp; int[] DuckerAnimationFramesWalking = { 45, 46 }; Animation DuckerAnimationWalking = new Animation(PlayType.Loop, DuckerAnimationFramesWalking, 16.0f); int[] DuckerAnimationFramesHolding = { 47 }; Animation DuckerAnimationHolding = new Animation(PlayType.Loop, DuckerAnimationFramesHolding, 3.0f); int[] DuckerAnimationFramesExploded = { 80, 81, 82, 83 }; Animation DuckerAnimationExploded = new Animation(PlayType.Loop, DuckerAnimationFramesExploded, 3.0f); Dictionary <string, Animation> DuckerAnimations = new Dictionary <string, Animation>() { { "walking", DuckerAnimationWalking }, { "shooting", DuckerAnimationHolding }, { "waiting", DuckerAnimationHolding }, { "exploded", DuckerAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteEnemies, DuckerAnimations, 5, 18); currAnimation = "walking"; }
public MapPawn(HexCell location, Pawn pawn, MovableType type) { m_location = location; m_pawn = pawn; location.pawn = this; // ! Stupid - Cell stores pawn present there ?? m_movableType = type; }
public Volcano(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; shootCooldown = rateoffire; shootCooldown2 = rateoffire; shootCooldown3 = rateoffire; }
public ArmedForce(HexCell location, Pawn pawn, MovableType type, List <Unit> units) : base(location, pawn, type) { foreach (Unit unit in units) { AddUnit(unit); } FogOfWar.Show(this); // Depends on units being added }
public bool IsMatch(MovableType movable, TargetType target) { for (int i = 0; i < _pairs.Count; i++) { var pair = _pairs[i]; if (pair.Movable == movable && pair.Target == target) { return(true); } } return(false); }
public Player(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D ProjectileSprite, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, ProjectileSprite) { isDead = false; shootCooldown = rateoffire; continuousShootCooldown = continuousrateoffire; missileShootCooldown = 1500; m_depth -= 0.1f; activePowerUps = new List <PowerUpType>(); m_trail = new List <Vector2>(); for (int i = 0; i < TRAIL_SIZE; i++) { m_trail.Add(this.m_pos); } int[] playerAnimationFramesUp = { 0 }; Animation playerAnimationUp = new Animation(PlayType.Once, playerAnimationFramesUp, 3.0f); int[] playerAnimationFramesForward = { 1 }; Animation playerAnimationForward = new Animation(PlayType.Once, playerAnimationFramesForward, 3.0f); int[] playerAnimationFramesDown = { 2 }; Animation playerAnimationDown = new Animation(PlayType.Once, playerAnimationFramesDown, 3.0f); int[] playerAnimationFramesExploded = { 4, 5, 6, 7 }; Animation playerAnimationExploded = new Animation(PlayType.Once, playerAnimationFramesExploded, 3.0f); Dictionary <string, Animation> playerAnimations = new Dictionary <string, Animation>() { { "up", playerAnimationUp }, { "forward", playerAnimationForward }, { "down", playerAnimationDown }, { "exploded", playerAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteViper, playerAnimations, 4, 3); int[] shieldAnimationFrames = { 12, 13, 14, 15 }; Animation shieldAnimation = new Animation(PlayType.Once, shieldAnimationFrames, 3.0f); Dictionary <string, Animation> shieldAnimations = new Dictionary <string, Animation>() { { "up", shieldAnimation }, { "forward", shieldAnimation }, { "down", shieldAnimation }, { "exploded", shieldAnimation } }; m_shieldAnimator = new AnimationController(m_world.m_spriteProjectile, shieldAnimations, 8, 3); currAnimation = "forward"; }
protected override void Awake( ) { base.Awake( ); if (gameObject.GetComponent <MovableSnapPointDetection>() != null) { snappingLogic = gameObject.GetComponent <MovableSnapPointDetection> ( ); _movableType = snappingLogic.movableType; } else { _movableType = MovableType.Movable; } }
public static ArmedForce Spawn(MovableType type, Pawn pawn, HexCell location) { ArmedForce ret; if (type == MovableType.Land) { pawn.Init(location, Random.Range(0f, 360f)); List <Unit> units = new List <Unit>(); units.Add(new Unit(MovableType.Land, 3, 3)); ret = new ArmedForce(location, pawn, MovableType.Land, units); return(ret); } else { return(null); } }
public Hatch(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; m_dropsPowerUp = dropsPowerUp; int[] HatchAnimationFrames = { 0, 1 }; Animation HatchAnimation = new Animation(PlayType.Loop, HatchAnimationFrames, 3.0f); int[] HatchAnimationFramesExploded = { 4, 5, 6, 7 }; Animation HatchAnimationExploded = new Animation(PlayType.Loop, HatchAnimationFramesExploded, 3.0f); Dictionary <string, Animation> HatchAnimations = new Dictionary <string, Animation>() { { "idle", HatchAnimation }, { "exploded", HatchAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteHatch, HatchAnimations, 4, 2); currAnimation = "idle"; }
public Fan(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; int[] fanAnimationFramesMoving = { 0, 1, 2, 3 }; Animation fanAnimationMoving = new Animation(PlayType.Loop, fanAnimationFramesMoving, 11.0f); int[] fanAnimationFramesExploded = { 80, 81, 82, 83 }; Animation fanAnimationExploded = new Animation(PlayType.Once, fanAnimationFramesExploded, 5.0f); Dictionary <string, Animation> fanAnimations = new Dictionary <string, Animation>() { { "moving", fanAnimationMoving }, { "exploded", fanAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteEnemies, fanAnimations, 5, 18); currAnimation = "moving"; }
public Jumper(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; center = m_pos.Y; default_maxVel = maxVel; int[] JumperAnimationFrames = { 35, 36, 37 }; Animation JumperAnimation = new Animation(PlayType.Once, JumperAnimationFrames, 3.0f); int[] JumperAnimationFramesExploded = { 80, 81, 82, 83 }; Animation JumperAnimationExploded = new Animation(PlayType.Once, JumperAnimationFramesExploded, 5.0f); Dictionary <string, Animation> JumperAnimations = new Dictionary <string, Animation>() { { "moving", JumperAnimation }, { "exploded", JumperAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteEnemies, JumperAnimations, 5, 18); currAnimation = "moving"; }
public Boss(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; int[] bossAnimationFramesMoving = { 0 }; Animation bossAnimationMoving = new Animation(PlayType.Loop, bossAnimationFramesMoving, 11.0f); int[] bossAnimationFramesExploded = { 4, 5, 6, 7 }; Animation bossAnimationExploded = new Animation(PlayType.Loop, bossAnimationFramesExploded, 3.0f); Dictionary <string, Animation> bossAnimations = new Dictionary <string, Animation>() { { "moving", bossAnimationMoving }, { "exploded", bossAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteBoss, bossAnimations, 2, 1); currAnimation = "moving"; shootCooldown = rateoffire; m_size = new Vector2(m_world.m_spriteBoss.Bounds.Width / 2, m_world.m_spriteBoss.Bounds.Height); }
public static bool CanTransverse(this MovableType type, HexCell from, HexCell to, HexDirection direction) { if (!to.IsExplored) { return(false); } if (type == MovableType.Land) { return(from.GetEdgeType(to) != HexEdgeType.Cliff && !to.IsUnderwater); } else if (type == MovableType.Naval) { return(to.IsUnderwater); } else if (type == MovableType.Air) { return(true); // Air units can walk anywhere } else { throw new System.NotImplementedException(); } }
public Dee(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; m_dropsPowerUp = dropsPowerUp; int[] deeAnimationFrames = { 40 }; int[] deeAnimationFramesShoot = { 41 }; Animation deeAnimation = new Animation(PlayType.Loop, deeAnimationFrames, 3.0f); Animation deeAnimationShoot = new Animation(PlayType.Loop, deeAnimationFramesShoot, 3.0f); int[] deeAnimationFramesExploded = { 80, 81, 82, 83 }; Animation deeAnimationExploded = new Animation(PlayType.Loop, deeAnimationFramesExploded, 3.0f); Dictionary <string, Animation> deeAnimations = new Dictionary <string, Animation>() { { "idle", deeAnimation }, { "shooting", deeAnimationShoot }, { "exploded", deeAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteEnemies, deeAnimations, 5, 18); currAnimation = "idle"; }
public Garun(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite, List <Enemy> squad, WorldMap map, bool dropsPowerUp, AnimationController animator) : base(world, pos, size, maxVel, accel, friction, rateoffire, continuousrateoffire, sprite, type, projectileSprite, squad, dropsPowerUp) { worldmap = map; int[] garunAnimationFramesMoving = { 25, 26, 27, 28, 27, 26, 25 }; Animation garunAnimationMoving = new Animation(PlayType.Loop, garunAnimationFramesMoving, 10.0f); int[] garunAnimationFramesExploded = { 80, 81, 82, 83 }; Animation garunAnimationExploded = new Animation(PlayType.Once, garunAnimationFramesExploded, 5.0f); Dictionary <string, Animation> garunAnimations = new Dictionary <string, Animation>() { { "moving", garunAnimationMoving }, { "exploded", garunAnimationExploded } }; m_animator = new AnimationController(m_world.m_spriteEnemies, garunAnimations, 5, 18); currAnimation = "moving"; center = m_pos.Y; offset = 0; //The offset to add to your Y radius = 50; //Whatever you want your radius to be }
bool IMovableType.mt_setPostCategories(string postid, string username, string password, MovableType.Category[] categories) { return false; }
public Character(Game1 world, Vector2 pos, Vector2 size, float maxVel, float accel, float friction, float rateoffire, float continuousrateoffire, Texture2D sprite, MovableType type, Texture2D projectileSprite) : base(world, pos, size, type) { m_maxVel = maxVel; m_accel = accel; m_friction = friction; m_rateOfFire = rateoffire; m_continuousRateOfFire = continuousrateoffire; m_ProjectileSprite = projectileSprite; m_ProjectileSpriteSize = new Vector2(m_ProjectileSprite.Width, m_ProjectileSprite.Height); m_sprite = sprite; m_spriteSize = new Vector2(m_sprite.Width, m_sprite.Height); visibleEntities = new List <Entity>(); }
public VolcanoProjectile(Game1 world, Vector2 pos, Vector2 size, Texture2D sprite, Vector2 velocity, Vector2 direction, MovableType type, ProjectileType projectileType, Character shooter) : base(world, pos, size, sprite, velocity, direction, type, projectileType, shooter) { m_vel = velocity; m_pos = pos; }
public Projectile(Game1 world, Vector2 pos, Vector2 size, Texture2D sprite, Vector2 velocity, Vector2 direction, MovableType type, ProjectileType projectileType, Character shooter) : base(world, pos, size, type) { m_sprite = sprite; m_spriteSize = new Vector2(m_sprite.Width, m_sprite.Height); m_vel = velocity; m_dir = direction; m_shooter = shooter; int[] playerProjectileAnimationFramesStandard = { 0 }; Animation playerProjectileAnimationStandard = new Animation(PlayType.Once, playerProjectileAnimationFramesStandard, 3.0f); int[] playerProjectileAnimationFramesDouble = { 1 }; Animation playerProjectileAnimationDouble = new Animation(PlayType.Once, playerProjectileAnimationFramesDouble, 3.0f); int[] playerProjectileAnimationFramesLaser = { 2 }; Animation playerProjectileAnimationLaser = new Animation(PlayType.Once, playerProjectileAnimationFramesLaser, 3.0f); int[] playerAnimationFramesMissileForward = { 3 }; Animation playerAnimationMissileForward = new Animation(PlayType.Once, playerAnimationFramesMissileForward, 3.0f); int[] playerAnimationFramesMissileDiagonal = { 4 }; Animation playerAnimationMissileDiagonal = new Animation(PlayType.Once, playerAnimationFramesMissileDiagonal, 3.0f); int[] enemyProjectileAnimationFrames = { 5 }; Animation enemyProjectileAnimation = new Animation(PlayType.Once, enemyProjectileAnimationFrames, 3.0f); Dictionary <string, Animation> projectileAnimations = new Dictionary <string, Animation>() { { "standard", playerProjectileAnimationStandard }, { "double", playerProjectileAnimationDouble }, { "laser", playerProjectileAnimationLaser }, { "missile forward", playerAnimationMissileForward }, { "missile diagonal", playerAnimationMissileDiagonal }, { "enemy", enemyProjectileAnimation } }; m_animator = new AnimationController(m_world.m_spriteProjectile, projectileAnimations, 8, 3); m_projectileType = projectileType; }
public Unit(MovableType movableType, int movementSpeed, int viewRange) { m_movableType = movableType; m_movementSpeed = movementSpeed; m_viewRange = viewRange; }