private void Walk(CommandAlias action) { //convert letter-number coordinate input from action.alias[0] to bytepair BytePair coord = BytePair.StringListToCoordinates(action.Alias, GameManager.instance.MapHandler.MapHeight - 1, -1); if (coord.x == 255 || coord.y == 255) { print("Invalid coordinate"); return; } TargetPosition = coord; transferer.MoveTo(TargetPosition.ToPositionVector2()); }
public void SetTarget(Player _shooter, BytePair _target) { shooter = _shooter; target = _target; base.SetLocalPosition(StartPointFromTo(_shooter.transform.position, target.ToPositionVector2(), SpawnMagnitude(_shooter.Col, col))); }
/// <summary> /// Launch method for the snowball /// </summary> public void SetTargetAndShoot(Player _shooter, BytePair _target) { SetTarget(_shooter, _target); transferer.MoveTo(target.ToPositionVector2()); }