Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赤子奈落
YGOProUnity_V2
Commits
2fa3922b
Commit
2fa3922b
authored
Apr 06, 2019
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ready button
parent
5165fc04
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
821 additions
and
89 deletions
+821
-89
Assets/SibylSystem/Room/Room.cs
Assets/SibylSystem/Room/Room.cs
+24
-1
Assets/transUI/prefab/lazyRoom.cs
Assets/transUI/prefab/lazyRoom.cs
+1
-0
Assets/transUI/prefab/trans_roomSingle.prefab
Assets/transUI/prefab/trans_roomSingle.prefab
+432
-78
Assets/transUI/prefab/trans_roomTag.prefab
Assets/transUI/prefab/trans_roomTag.prefab
+364
-10
No files found.
Assets/SibylSystem/Room/Room.cs
View file @
2fa3922b
...
...
@@ -341,14 +341,16 @@ public class Room : WindowServantSP
}
UIHelper.shiftButton(startButton(), true);
lazyRoom.start.localScale = Vector3.one;
lazyRoom.ready.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f + 30f, 0);
lazyRoom.duelist.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f, 0);
lazyRoom
.
observer
.
localPosition
=
new
Vector3
(
lazyRoom
.
duelist
.
localPosition
.
x
,
-
94.2f
-
30f
,
0
);
lazyRoom.observer.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f
-
30f, 0);
lazyRoom.start.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f - 30f - 30f, 0);
}
else
{
UIHelper.shiftButton(startButton(), false);
lazyRoom.start.localScale = Vector3.zero;
lazyRoom.ready.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f, 0);
lazyRoom.duelist.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f - 30f, 0);
lazyRoom.observer.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f - 30f - 30f, 0);
lazyRoom.start.localPosition = new Vector3(lazyRoom.duelist.localPosition.x, -94.2f - 30f - 30f - 30f, 0);
...
...
@@ -832,6 +834,7 @@ public class Room : WindowServantSP
UIHelper.registUIEventTriggerForClick(exitButton().gameObject, listenerForClicked);
UIHelper.registUIEventTriggerForClick(duelistButton().gameObject, listenerForClicked);
UIHelper.registUIEventTriggerForClick(observerButton().gameObject, listenerForClicked);
UIHelper.registUIEventTriggerForClick(readyButton().gameObject, listenerForClicked);
realize();
superScrollView.refreshForOneFrame();
}
...
...
@@ -878,12 +881,32 @@ public class Room : WindowServantSP
return UIHelper.getByName<UIButton>(gameObject, "observer_");
}
private UIButton readyButton()
{
return UIHelper.getByName<UIButton>(gameObject, "ready_");
}
void listenerForClicked(GameObject gameObjectListened)
{
if (gameObjectListened.name == "exit_")
{
Program.I().ocgcore.onExit();
}
if (gameObjectListened.name == "ready_")
{
if (selftype < realPlayers.Length && realPlayers[selftype] != null)
{
if (realPlayers[selftype].getIfPreped())
{
TcpHelper.CtosMessage_HsNotReady();
}
else
{
TcpHelper.CtosMessage_UpdateDeck(new YGOSharp.Deck("deck/" + Config.Get("deckInUse", "wizard") + ".ydk"));
TcpHelper.CtosMessage_HsReady();
}
}
}
if (gameObjectListened.name == "duelist_")
{
TcpHelper.CtosMessage_HsToDuelist();
...
...
Assets/transUI/prefab/lazyRoom.cs
View file @
2fa3922b
...
...
@@ -2,6 +2,7 @@
using
System.Collections
;
public
class
lazyRoom
:
MonoBehaviour
{
public
Transform
ready
;
public
Transform
duelist
;
public
Transform
observer
;
public
Transform
start
;
...
...
Assets/transUI/prefab/trans_roomSingle.prefab
View file @
2fa3922b
This diff is collapsed.
Click to expand it.
Assets/transUI/prefab/trans_roomTag.prefab
View file @
2fa3922b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment