コード例 #1
0
 private bool IsMahBuddy(AngryBlock aOther)
 {
     if (aOther == null)
     {
         return(false);
     }
     return(aOther.myIsContaminated == false && aOther.myBundle == myBundle);
 }
コード例 #2
0
 private void SetAngryTile()
 {
     if (myIsContaminated)
     {
         myTileSetSprite.SetToAlone();
     }
     else
     {
         Point      position   = GetPosition();
         AngryBlock aboveBlock = myGridBundle.Container.GetBlockAtPosition(position.X, position.Y + 1) as AngryBlock;
         AngryBlock rightBlock = myGridBundle.Container.GetBlockAtPosition(position.X + 1, position.Y) as AngryBlock;
         AngryBlock downBlock  = myGridBundle.Container.GetBlockAtPosition(position.X, position.Y - 1) as AngryBlock;
         AngryBlock leftBlock  = myGridBundle.Container.GetBlockAtPosition(position.X - 1, position.Y) as AngryBlock;
         myTileSetSprite.SetManually(IsMahBuddy(aboveBlock), IsMahBuddy(rightBlock), IsMahBuddy(downBlock), IsMahBuddy(leftBlock));
     }
 }
コード例 #3
0
        public static void HandleBopStatic(AbstractBlock aBlock)
        {
            AngryBlock angryBlock = aBlock as AngryBlock;

            angryBlock.myBundle.HandleBop(aBlock);
        }