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
a5f345be
Commit
a5f345be
authored
Dec 26, 2011
by
zh99998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BGM修正,退出时报错修正
parent
7f34a9cc
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
15 deletions
+19
-15
lib/iduel/event.rb
lib/iduel/event.rb
+1
-1
lib/iduel/iduel.rb
lib/iduel/iduel.rb
+2
-2
lib/main.rb
lib/main.rb
+4
-7
lib/scene_duel.rb
lib/scene_duel.rb
+9
-2
lib/scene_hall.rb
lib/scene_hall.rb
+1
-1
lib/scene_watch.rb
lib/scene_watch.rb
+1
-1
lib/window.rb
lib/window.rb
+1
-1
No files found.
lib/iduel/event.rb
View file @
a5f345be
...
...
@@ -20,7 +20,7 @@ class Game_Event
when
"K"
WatchAction
when
"M"
QROOMOK
#TODO
Leave
when
"O"
Chat
when
"P"
...
...
lib/iduel/iduel.rb
View file @
a5f345be
...
...
@@ -54,9 +54,9 @@ class Iduel < Game
end
def
leave
if
@room
.
include?
@user
#
send
(
10
,
@key
,
room
.
id
,
checknum
(
"QROOM"
,
@session
+
room
.
id
.
to_s
))
else
send
(
"QUITWATCHROOM"
,
@key
,
checknum
(
"QUITWATCHROOM"
,
@session
))
send
(
9
,
@key
,
checknum
(
"QUITWATCHROOM"
,
@session
))
end
end
def
action
(
action
)
...
...
lib/main.rb
View file @
a5f345be
#encoding: UTF-8
#仅用于调试,发布时删
alias
gbk_puts
puts
def
puts
(
*
args
)
gbk_puts
(
*
(
args
.
collect
{
|
item
|
item
.
to_s
.
encode
"GBK"
,
:invalid
=>
:replace
,
:undef
=>
:replace
}))
end
def
p
(
*
args
)
print
(
args
.
collect
{
|
item
|
item
.
inspect
.
encode
"GBK"
,
:invalid
=>
:replace
,
:undef
=>
:replace
}.
join
(
"
\n
"
)
+
"
\n
"
)
rescue
print
(
args
.
join
(
"
\n
"
)
+
"
\n
"
)
#仅用于调试
Windows
=
RUBY_PLATFORM
[
"mingw"
]
||
RUBY_PLATFORM
[
"mswin"
]
if
Windows
STDOUT
.
set_encoding
"GBK"
,
"UTF-8"
,
:invalid
=>
:replace
,
:undef
=>
:replace
end
def
filesize_inspect
(
size
)
...
...
lib/scene_duel.rb
View file @
a5f345be
...
...
@@ -29,7 +29,7 @@ class Scene_Duel < Scene
end
def
start
@bgm
=
Mixer
::
Music
.
load
"audio/bgm/title.ogg"
Mixer
.
fade_in_music
(
@bgm
,
8000
,
-
1
)
Mixer
.
fade_in_music
(
@bgm
,
-
1
,
800
)
@background
=
Surface
.
load
"graphics/field/main.png"
Surface
.
blit
(
@background
,
0
,
0
,
0
,
0
,
$screen
,
0
,
0
)
...
...
@@ -68,7 +68,7 @@ class Scene_Duel < Scene
end
def
change_phase
(
phase
)
action
Action
::
ChangePhase
.
new
(
true
,
phase
)
if
phase
==
:EP
if
phase
==
:EP
and
action
Action
::
TurnEnd
.
new
(
true
,
$game
.
player_field
,
$game
.
turn_player
?
$game
.
turn
:
$game
.
turn
.
next
)
end
end
...
...
@@ -105,6 +105,8 @@ class Scene_Duel < Scene
when
Key
::
F5
reset
@player_field_window
.
refresh
when
Key
::
F10
$game
.
leave
end
else
super
...
...
@@ -136,6 +138,11 @@ class Scene_Duel < Scene
Widget_Msgbox
.
new
(
event
.
title
,
event
.
message
){
$scene
=
Scene_Title
.
new
}
when
Game_Event
::
Leave
$scene
=
Scene_Hall
.
new
when
Game_Event
::
NewRoom
if
event
.
room
==
$game
.
room
@player_lp_window
.
player
=
$game
.
room
.
player1
@opponent_lp_window
.
player
=
$game
.
room
.
player2
end
end
end
def
update
...
...
lib/scene_hall.rb
View file @
a5f345be
...
...
@@ -22,7 +22,7 @@ class Scene_Hall < Scene
@chat
=
Window_Chat
.
new
(
321
,
551
,
682
,
168
)
bgm
=
Mixer
::
Music
.
load
(
"audio/bgm/hall.ogg"
)
Mixer
.
fade_in_music
(
bgm
,
800
,
-
1
)
Mixer
.
fade_in_music
(
bgm
,
-
1
,
800
)
@bgm
.
destroy
if
@bgm
@bgm
=
bgm
@count
=
0
...
...
lib/scene_watch.rb
View file @
a5f345be
...
...
@@ -15,7 +15,7 @@ class Scene_Watch < Scene_Duel
end
def
start
super
$game
.
action
Action
::
Chat
.
new
(
true
,
"
#{
$game
.
user
.
name
}
(
#{
$game
.
user
.
id
}
)进入了观战"
)
#
$game.action Action::Chat.new(true, "#{$game.user.name}(#{$game.user.id})进入了观战")
end
def
handle_game
(
event
)
case
event
...
...
lib/window.rb
View file @
a5f345be
...
...
@@ -42,7 +42,7 @@ class Window
def
destroy
@destroyed
=
true
@contents
.
destroy
if
@contents
$scene
.
windows
.
delete
self
$scene
.
windows
.
delete
self
if
$scene
end
def
destroyed?
@destroyed
...
...
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