Exemple #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());
    }
Exemple #2
0
 public void SetTarget(Player _shooter, BytePair _target)
 {
     shooter = _shooter;
     target  = _target;
     base.SetLocalPosition(StartPointFromTo(_shooter.transform.position, target.ToPositionVector2(), SpawnMagnitude(_shooter.Col, col)));
 }
Exemple #3
0
 /// <summary>
 /// Launch method for the snowball
 /// </summary>
 public void SetTargetAndShoot(Player _shooter, BytePair _target)
 {
     SetTarget(_shooter, _target);
     transferer.MoveTo(target.ToPositionVector2());
 }