Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/minimap implementation #98

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

ehcamero
Copy link
Contributor

No description provided.

@@ -16,7 +16,7 @@ public class LoginController : MonoBehaviour {

NetworkClient = FindObjectOfType<NetworkClient>();

NetworkClient.ChangeServer("127.0.0.1", 6900);
NetworkClient.ChangeServer("192.168.0.3", 6900);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this

@@ -11,6 +11,7 @@ public class MapController : MonoBehaviour {
[SerializeField] private Light worldLight;

public MapUiController UIController;
public GameEventUI MiniMapController; //Adicionado
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use english comments, also this seems irrelevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments removed

@@ -0,0 +1,18 @@
using UnityEngine;

public class SingletonDontDestroy<T> : MonoBehaviour where T : MonoBehaviour
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think SingletonMonoBehaviour would be a better name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name changed

Comment on lines 6 to 7
public static event Action EventUpdateCurrentMiniMap;
public static event Action EventUpdateCoordinateMiniMap;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Event probably can be omitted from the variable name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Event omitted


private void Update()
{
EventUpdateCurrentMiniMap?.Invoke();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this one? We have another one that is triggered by GameManager which invokes the event passing the map name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed, the event was registered on GameManager.OnMapChanged

@@ -24,7 +24,7 @@ public class GridRenderer : MonoBehaviour {
GameManager = FindObjectOfType<GameManager>();
PathFinder = FindObjectOfType<PathFinder>();

transform.localPosition = new Vector3(0.5f, 0f, 0.5f);
//transform.localPosition = new Vector3(0.5f, 0f, 0.5f);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment on lines +2 to +3
"root": "D:/Ragnarok/Data kro/",
"grf": ["rdata.grf", "data.grf"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert as well

*/
}

private void OnEventUpdateMap()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can change the GameManager event to pass the map name as well, make it simpler here

Comment on lines +10 to +23
[SerializeField] private Canvas _displayControl;
[SerializeField] private RectMask2D _mask;
[SerializeField] private RawImage _mapBase;
[SerializeField] private Button _btnPlus;
[SerializeField] private Button _btnMinus;
[SerializeField] private Button _btnMinimize;
[SerializeField] private TextMeshProUGUI _coordinates;
[SerializeField] private RawImage _playerIndicator;

[SerializeField] private int m_nZoom = DEFAULT_ZOOM_INDEX;
[SerializeField] private float m_fOffSetX = 0.0f;
[SerializeField] private float m_fOffSetY = 0.0f;
[SerializeField] private int m_nCenterX = 0;
[SerializeField] private int m_nCenterY = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda dislike the hungarian notation and the underscore for private fields, but that's debatable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants