Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
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
syntax_j
mycard
Commits
bda578b1
Commit
bda578b1
authored
Mar 06, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ygocore
parent
f7dfd90e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
lib/scene_lobby.rb
lib/scene_lobby.rb
+2
-2
lib/window_roomlist.rb
lib/window_roomlist.rb
+2
-2
lib/ygocore/game.rb
lib/ygocore/game.rb
+3
-3
No files found.
lib/scene_lobby.rb
View file @
bda578b1
...
@@ -40,11 +40,11 @@ class Scene_Lobby < Scene
...
@@ -40,11 +40,11 @@ class Scene_Lobby < Scene
when
Key
::
RETURN
when
Key
::
RETURN
@active_window
.
clicked
@active_window
.
clicked
when
Key
::
F2
when
Key
::
F2
$game
.
host
(
"test"
)
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"创建房间"
,
"正在等待对手"
)
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"创建房间"
,
"正在等待对手"
)
$game
.
host
(
"test"
)
when
Key
::
F3
when
Key
::
F3
$game
.
join
'localhost'
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入房间"
)
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入房间"
)
$game
.
join
'localhost'
when
Key
::
F5
when
Key
::
F5
if
@roomlist
.
items
and
room
=
@roomlist
.
items
.
find
{
|
room
|
room
.
player1
==
$game
.
user
or
room
.
player2
==
$game
.
user
}
if
@roomlist
.
items
and
room
=
@roomlist
.
items
.
find
{
|
room
|
room
.
player1
==
$game
.
user
or
room
.
player2
==
$game
.
user
}
$game
.
qroom
room
$game
.
qroom
room
...
...
lib/window_roomlist.rb
View file @
bda578b1
...
@@ -40,11 +40,11 @@ class Window_RoomList < Window_Scrollable
...
@@ -40,11 +40,11 @@ class Window_RoomList < Window_Scrollable
def
clicked
def
clicked
return
unless
@index
and
room
=
@items
[
@index
]
return
unless
@index
and
room
=
@items
[
@index
]
if
room
.
full?
if
room
.
full?
$game
.
watch
room
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入观战"
)
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入观战"
)
$game
.
watch
room
else
else
$game
.
join
room
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入房间"
)
@joinroom_msgbox
=
Widget_Msgbox
.
new
(
"加入房间"
,
"正在加入房间"
)
$game
.
join
room
end
end
end
end
end
end
\ No newline at end of file
lib/ygocore/game.rb
View file @
bda578b1
...
@@ -26,7 +26,7 @@ class Ygocore < Game
...
@@ -26,7 +26,7 @@ class Ygocore < Game
Game_Event
.
push
Game_Event
::
Login
.
new
(
User
.
new
(
username
.
to_sym
,
username
))
Game_Event
.
push
Game_Event
::
Login
.
new
(
User
.
new
(
username
.
to_sym
,
username
))
end
end
def
watch
(
room
)
def
watch
(
room
)
join
(
room
)
Widget_Msgbox
.
new
(
"观战"
,
"ygocore不支持加入已经开始游戏的房间"
,
:ok
=>
"确定"
)
end
end
def
join
(
room
)
def
join
(
room
)
return
if
@last_clicked
and
Time
.
now
-
@last_clicked
<
3
#防止重复点击
return
if
@last_clicked
and
Time
.
now
-
@last_clicked
<
3
#防止重复点击
...
@@ -94,11 +94,11 @@ class Ygocore < Game
...
@@ -94,11 +94,11 @@ class Ygocore < Game
@@keybd_event
.
call
(
VK_RETURN
,
0
,
0
,
0
)
@@keybd_event
.
call
(
VK_RETURN
,
0
,
0
,
0
)
@@keybd_event
.
call
(
VK_RETURN
,
0
,
KEYEVENTF_KEYUP
,
0
)
@@keybd_event
.
call
(
VK_RETURN
,
0
,
KEYEVENTF_KEYUP
,
0
)
else
else
Widget_Msgbox
.
new
(
"加入房间"
,
'ygocore运行失败'
)
Widget_Msgbox
.
new
(
"加入房间"
,
'ygocore运行失败'
,
:ok
=>
"确定"
)
end
end
end
end
end
end
$scene
=
Scene_Lobby
.
new
Widget_Msgbox
.
new
(
"加入房间"
,
"已经加入房间"
).
destroy
#仅仅为了消掉正在加入房间的消息框
end
end
def
refresh
def
refresh
Thread
.
new
do
Thread
.
new
do
...
...
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