public void OnActionConfirm() { Debug.Log(currentAction); onUnitAction = false; whileUnitAction = true; TileNode target = battle.GetTile(transform.position); battle.ActUnit(battle.currentUnit, currentAction, target); cam.SetMenuMode(true); ResetWandToUnit(); ClearTargetTiles(); }
public override HashSet <TileNode> GetSelectionTiles(BattleUnit user, BattleGrid battle) { HashSet <TileNode> set = new HashSet <TileNode>(); set.Add(battle.GetTile(user.GetPosKey())); return(set); }
public override HashSet <TileNode> GetSelectionTiles(BattleUnit user, BattleGrid battle) { TileNode center = battle.GetTile(user.GetPosKey()); return(new HashSet <TileNode>() { center }); }
async private Task <BoardCharacter> CreateBoardCharacter(Character character) { string plist = await _server.GetJson(character.SpriteUrl); var boardCharacter = Instantiate(boardCharacterPrefab); var localScale = boardCharacter.transform.localScale; localScale = new Vector3( character.Facing == 0 ? 1 : character.Facing * localScale.x, localScale.y, localScale.z); boardCharacter.transform.localScale = localScale; boardCharacter.ParseCardJson(character, plist, _interface.CardPopup); boardCharacter.name = character.Id; character.BoardCharacter = boardCharacter; var tile = _grid.GetTile(boardCharacter.TileId); tile.ObjectOnTile = boardCharacter; return(boardCharacter); }
public override HashSet <TileNode> GetSelectionTiles(BattleUnit user, BattleGrid battle) { TileNode center = battle.GetTile(user.GetPosKey()); return(battle.GetRangeTiles(center, 1.5f)); }