상속: Sprite
 public PlayerWithWeapon(Vector2 userPosition, Vector2 tileBounds,
     List<TileRef> InitialSheetRefs, 
         int frameWidth, int frameHeight, float layerDepth)
     : base(userPosition, InitialSheetRefs, frameWidth, frameHeight, layerDepth)
 {
     _directionFrames.Add(InitialSheetRefs); // Stopped
     _directionFrames.Add(new List<TileRef>()); // LEFT
     _directionFrames.Add(new List<TileRef>()); // RIGHT
     _directionFrames.Add(new List<TileRef>()); // UP
     _directionFrames.Add(new List<TileRef>()); // Down All to be set by setFrameSet
     Site = new CrossHair(userPosition, new List<TileRef>() { new TileRef(5,4,0) }, frameWidth, frameHeight, 0f);
     TileBound = tileBounds;
 }
 public PlayerWithWeapon(Game game, Camera cam, Vector2 userPosition, Vector2 tileBounds,
                         List <TileRef> InitialSheetRefs,
                         int frameWidth, int frameHeight, float layerDepth)
     : base(game, userPosition, InitialSheetRefs, frameWidth, frameHeight, layerDepth)
 {
     _cam = cam;
     _directionFrames.Add(InitialSheetRefs);     // Stopped
     _directionFrames.Add(new List <TileRef>()); // LEFT
     _directionFrames.Add(new List <TileRef>()); // RIGHT
     _directionFrames.Add(new List <TileRef>()); // UP
     _directionFrames.Add(new List <TileRef>()); // Down All to be set by setFrameSet
     TileBound         = tileBounds;
     DamageRate        = 10;
     tileRangeDistance = 7; // Clamp the CrossHair based on the Range Rectangle
     Site = new CrossHair(game, _cam, userPosition, new List <TileRef>()
     {
         new TileRef(11, 6, 0)
     }, frameWidth, frameHeight, 2f);
 }
 public PlayerWithWeapon(Game g, Texture2D texture, Vector2 userPosition, int framecount)
     : base(g,texture,userPosition,framecount)
 {
     myGame = g;
         Site = new CrossHair(g, g.Content.Load<Texture2D>(@"Textures\CrossHair"), userPosition, 1);
 }
예제 #4
0
 public PlayerWithWeapon(Game g, Texture2D texture, Vector2 userPosition, int framecount) : base(g, texture, userPosition, framecount)
 {
     myGame = g;
     Site   = new CrossHair(g, g.Content.Load <Texture2D>(@"Textures\CrossHair"), userPosition, 1);
 }