private bool IsMahBuddy(AngryBlock aOther) { if (aOther == null) { return(false); } return(aOther.myIsContaminated == false && aOther.myBundle == myBundle); }
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)); } }
public static void HandleBopStatic(AbstractBlock aBlock) { AngryBlock angryBlock = aBlock as AngryBlock; angryBlock.myBundle.HandleBop(aBlock); }