Esempio n. 1
0
 public override void Update(Player aPlayer, Tile[,] aTileArray)
 {
     TileCollision(aPlayer, aTileArray);
     for (int i = 0; i < SnowballManager.AccessSnowballList.Count; i++)
     {
         if (SnowballManager.AccessSnowballList[i].AccessSnowballRectangle.Intersects(myRectangle))
         {
             SnowballManager.RemoveSnowball(i);
         }
     }
 }
Esempio n. 2
0
 public void TileCollsion(Player aPlayer, Tile[,] aTileArray)
 {
     if (aPlayer.AccessRectangle.Intersects(myRectangle) && aPlayer.AccessRectangle.Bottom < myRectangle.Bottom - 50)
     {
         aPlayer.AccessGroundBool = true;
     }
     for (int i = 0; i < SnowballManager.AccessSnowballList.Count; i++)
     {
         if (SnowballManager.AccessSnowballList[i].AccessSnowballRectangle.Intersects(myRectangle))
         {
             SnowballManager.RemoveSnowball(i);
         }
     }
 }
Esempio n. 3
0
 public void Shoot()
 {
     SnowballManager.AddSnowball(new Snowball(myDirection, myPosition));
 }