Skip to content

Commit

Permalink
chat system and camera movement bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amm266 committed Feb 26, 2021
1 parent b0ca6c0 commit 9bd1e96
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Assets/MoveCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public class MoveCamera : MonoBehaviour
public float maxSize;
private int width;
private int height;
[SerializeField]
private Camera myCamera;

void Awake()
{
myCamera = GetComponent<Camera>();
width = Screen.width;
height = Screen.height;
}
Expand Down
5 changes: 5 additions & 0 deletions Assets/Scripts/ChatManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ private void Awake()
}

private void Start()
{
ClearChatBoxes();
}

public void ClearChatBoxes()
{
LeftTextsCount = LeftTexts.Length;
for (int i = 0; i < LeftTextsCount; i++)
Expand Down
2 changes: 2 additions & 0 deletions Assets/Scripts/UIManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private void FixedUpdate()
SetTurnText(CurrentTurn.ToString());
LastApplyTime = Time.time;
Debug.Log(CurrentTurn);
ChatManager.Instance.ClearChatBoxes();
GameManager.ApplyLog(CurrentTurn);
}
}
Expand All @@ -57,6 +58,7 @@ public void ApplyTurnButtonClicked()
CurrentTurn = int.Parse(turnToGo);
SetTurnText(turnToGo);
LastApplyTime = Time.time;
ChatManager.Instance.ClearChatBoxes();
GameManager.ApplyLog(CurrentTurn);
}

Expand Down
4 changes: 2 additions & 2 deletions ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/SampleScene.unity
guid: 2cda990e2423bbf4892e6590ba056729
path: Assets/Scenes/MapScene.unity
guid: 4a9141ef9c4e5c94dab2305fc5450bd6
m_configObjects: {}

0 comments on commit 9bd1e96

Please sign in to comment.