예제 #1
0
        //Character attributes
        public BasicGroundEnemy(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, //GameObject attributes
		               WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons,	//PhysicalObject attributes
		               double runSpeed, double maxSpeed)
            : base(game, position, velocity, sprites, defaultSprite, controller, worldPhysics, objectPhysics, boundingPolygons, runSpeed, maxSpeed)
        {
            Stompable = true;
        }
예제 #2
0
        //Just pass on the constructor stuff to base
        public Character(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, 
		                 WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons,
		                 double runSpeed, double maxSpeed)
            : base(game, position, velocity, sprites, defaultSprite, controller, worldPhysics, objectPhysics, boundingPolygons)
        {
            CurrentSprite.PlayAnimation("stand", true);
            MaxSpeed = maxSpeed;
            RunSpeed = runSpeed;
        }
예제 #3
0
        public PhysicalObject(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, 
		                       WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons)
            : base(game, position, velocity, sprites, defaultSprite, controller, boundingPolygons)
        {
            this.worldPhysics = worldPhysics;
            this.objectPhysics = objectPhysics;
            this.friction = objectPhysics.Friction*worldPhysics.GroundFrictionFactor;
            inAirTimer.Start();
        }
예제 #4
0
파일: Player.cs 프로젝트: hallgeirl/Hiage
        public Player(Game game, Vector position, Vector velocity, Dictionary<string, Sprite> sprites, string defaultSprite, IController controller, //GameObject attributes
		               WorldPhysics worldPhysics, ObjectPhysics objectPhysics, Dictionary<string, BoundingPolygon> boundingPolygons, //PhysicalObject attributes
		               double runSpeed, double maxSpeed, 	//Character attributes
		               PlayerState state)
            : base(game, position, velocity, sprites, defaultSprite, controller, worldPhysics, objectPhysics, boundingPolygons, runSpeed, maxSpeed)
        {
            oldFriction = objectPhysics.Friction;
            PlayerState = state;

            invincibleTimer.Start();
        }
예제 #5
0
파일: Mushroom.cs 프로젝트: hallgeirl/Hiage
        public Mushroom(Game game, 
		                    Vector position, 
		                    Dictionary<string, Sprite> sprites, string defaultSprite, 
		                    WorldPhysics worldPhysics, ObjectPhysics objectPhysics, 
		                    Dictionary<string, BoundingPolygon> polygons, 
		                    ItemType itemType)
            : base(game, position, new Vector(0,0), sprites, defaultSprite, new DumbGroundAI(), worldPhysics, objectPhysics, polygons)
        {
            CurrentSprite.PlayAnimation(Sprite.DEFAULT_ANIMATION, true);
            MushroomType = itemType;
        }