-
Notifications
You must be signed in to change notification settings - Fork 61
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
base: develop
Are you sure you want to change the base?
Feature/minimap implementation #98
Conversation
@@ -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); |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name changed
public static event Action EventUpdateCurrentMiniMap; | ||
public static event Action EventUpdateCoordinateMiniMap; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
"root": "D:/Ragnarok/Data kro/", | ||
"grf": ["rdata.grf", "data.grf"], |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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
[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; |
There was a problem hiding this comment.
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
No description provided.