コード例 #1
0
 public void StartOverworld(Vector2 entityPosition)
 {
     if (Data.OverworldSpriteName != null && Data.OverworldSpriteName.Length > 0)
     {
         OverworldEntity = new Entity(ResourceManager.GetNewSprite(Data.OverworldSpriteName), entityPosition);
     }
     else
     {
         OverworldEntity = new Entity(ResourceManager.GetNewSkeleton(Data.OverworldSkeletonName), entityPosition);
         Rectangle customBoundingBox = OverworldEntity.GetBoundingBoxAt(Vector2.Zero);
         customBoundingBox.Height         /= 4;
         customBoundingBox.Y              += customBoundingBox.Height * 3;
         OverworldEntity.CustomBoundingBox = customBoundingBox;
         OverworldEntity.Scale             = new Vector2(0.3f);
     }
 }
コード例 #2
0
 public void StartOverworld(Vector2 entityPosition)
 {
     if (Data.OverworldSpriteName != null && Data.OverworldSpriteName.Length > 0)
         OverworldEntity = new Entity(ResourceManager.GetNewSprite(Data.OverworldSpriteName), entityPosition);
     else
     {
         OverworldEntity = new Entity(ResourceManager.GetNewSkeleton(Data.OverworldSkeletonName), entityPosition);
         Rectangle customBoundingBox = OverworldEntity.GetBoundingBoxAt(Vector2.Zero);
         customBoundingBox.Height /= 4;
         customBoundingBox.Y += customBoundingBox.Height * 3;
         OverworldEntity.CustomBoundingBox = customBoundingBox;
         OverworldEntity.Scale = new Vector2(0.3f);
     }
 }