public void ChangePosition(Mage mage2Move) { CreateAttackCommand(mage2Move); IndividualTiles magePreviousTile = mage2Move.myCurrentTile; mage2Move.MoveToTilePushed(myCurrentTile); mage2Move.UpdateInformationAfterMovement(myCurrentTile); this.MoveToTilePushed(magePreviousTile); UpdateInformationAfterMovement(magePreviousTile); mage2Move.hasMoved = true; LM.UnitHasFinishedMovementAndRotation(); UIM.RefreshTokens(); if (mage2Move.isDecoyBomb2) { TM.GetSurroundingTiles(myCurrentTile, 1, true, false); //Hago daño a las unidades adyacentes for (int i = 0; i < TM.surroundingTiles.Count; ++i) { if (TM.surroundingTiles[i] != null) { TM.surroundingTiles[i].ColorAttack(); } } StartCoroutine("WaitToDamageSurroundingAfterChangePos"); } HideAttackEffect(null); }
public void ChangePosition(PlayerUnit unitToMove) { CreateAttackCommand(unitToMove); IndividualTiles valkyriePreviousTile = unitToMove.myCurrentTile; unitToMove.MoveToTilePushed(myCurrentTile); unitToMove.UpdateInformationAfterMovement(myCurrentTile); this.MoveToTilePushed(valkyriePreviousTile); UpdateInformationAfterMovement(valkyriePreviousTile); hasMoved = true; LM.UnitHasFinishedMovementAndRotation(); UIM.RefreshTokens(); }