Skip to content

Commit

Permalink
Ajout des mis à jour de la taille du monde sur nouvelle partie
Browse files Browse the repository at this point in the history
  • Loading branch information
Mushu authored and Mushu committed Jul 8, 2018
1 parent 565075f commit e6fe884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Assets/Scripts/Cam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ void Update()
t.Translate(Input.GetAxis("Horizontal") * moveFactor, 0f, Input.GetAxis("Vertical") * moveFactor);

// Rotation
//Debug.Log($"Center={World.Center}");
t.RotateAround(World.Center, Vector3.up, Input.GetAxis("Rotate") * rotateSpeed * Time.deltaTime);

// Clamp position
Expand Down
3 changes: 2 additions & 1 deletion Assets/Scripts/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ void Start()

if (loadData == null)
{
UpdateWorldSize();
InitLoader();
StartCoroutine(Generate());
}
Expand Down Expand Up @@ -573,7 +574,7 @@ public void BuildRoad(Cell pos)
AudioManager.Player.Play("buildRoad");
Road road = new Road(pos, roadPrefab);
Constructions[pos.X, pos.Y] = road;

UpdateRoad(road);
var neighbors = Neighbors(pos);
foreach (Road r in neighbors)
Expand Down

0 comments on commit e6fe884

Please sign in to comment.