Example #1
0
 /// <summary>
 /// Gets the entity' tile index. The tile index is used to determine an entity's position in the map.
 /// </summary>
 ///
 /// <returns></returns>
 public int GetTileIndex()
 {
     return(CalcHelper.GetIndexInGameWorld(CollRectangle.Center.X, CollRectangle.Center.Y));
     //if (GameWorld.WorldData == null) return -1;
     //return (int)(CollRectangle.Center.Y / AdamGame.Tilesize * GameWorld.WorldData.LevelWidth) + (int)(CollRectangle.Center.X / AdamGame.Tilesize);
 }