예제 #1
0
    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());
    }
예제 #2
0
 /// <summary>
 /// Launch method for the snowball
 /// </summary>
 public void SetTargetAndShoot(Player _shooter, BytePair _target)
 {
     SetTarget(_shooter, _target);
     transferer.MoveTo(target.ToPositionVector2());
 }