Esempio n. 1
0
    public void SetRandomPosition(float radius)
    {
        Vector2 newPosition = new Vector2(Random.Range(-radius, radius), Random.Range(-radius, radius));

        positionOnMap = PositionChecker.CheckPosition(positionOnMap, newPosition, radius, moveRadius);

        Vector2 newDirection = new Vector2(Random.Range(-radius, radius), Random.Range(-radius, radius));

        direction = PositionChecker.CheckPosition(positionOnMap, newPosition, radius, moveRadius);
    }
Esempio n. 2
0
    public void MoveTo(Vector2 point)
    {
        Vector2 newPosition2 = PositionChecker.CheckPosition(characterData.GetPosition(), point, 15, 5);

        newPosition = new Vector3(newPosition2.x, 0, newPosition2.y);
    }
Esempio n. 3
0
 public void SetPosition(Vector2 newPosition)
 {
     positionOnMap = PositionChecker.CheckPosition(positionOnMap, newPosition, 15, moveRadius);
 }