Skip to content

Feature/minimap implementation#98

Open
ehcamero wants to merge 6 commits intoguilhermelhr:developfrom
ehcamero:feature/minimap_implementation
Open

Feature/minimap implementation#98
ehcamero wants to merge 6 commits intoguilhermelhr:developfrom
ehcamero:feature/minimap_implementation

Conversation

@ehcamero
Copy link
Copy Markdown
Contributor

No description provided.

NetworkClient = FindObjectOfType<NetworkClient>();

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

Choose a reason for hiding this comment

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

Revert this

[SerializeField] private Light worldLight;

public MapUiController UIController;
public GameEventUI MiniMapController; //Adicionado
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

PathFinder = FindObjectOfType<PathFinder>();

transform.localPosition = new Vector3(0.5f, 0f, 0.5f);
//transform.localPosition = new Vector3(0.5f, 0f, 0.5f);
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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