public MoveAction(Mech inMechActor, System.Action inOnCompleteCallback) : base(inMechActor, inOnCompleteCallback) { _walkableTilePositions = _mechActor.movementComponent.GetWalkableTilePositions(); _tilesIndicator = new TilesIndicator(_walkableTilePositions, new UnityEngine.Color(0, 1, 0, 0.5f)); Program.inputManager.OnTileClicked += ExecuteIfTileIsWalkable; _mechActor.inputComponent.OnSelectionLost += Cancel; }
public AttackAction(Mech inMechActor, System.Action inOnCompleteCallback, Weapon inWeaponInUse) : base(inMechActor, inOnCompleteCallback) { weaponInUse = inWeaponInUse; _positionsWithinRange = GetPositionsWithinRange(); _tilesIndicator = new TilesIndicator(_positionsWithinRange, new UnityEngine.Color(1, 0, 0, 0.5f)); Program.inputManager.OnTileClicked += ExecuteIfShootable; }