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
9d6c04cd
Commit
9d6c04cd
authored
Feb 28, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
BGM标题动画纵向
parent
6790eed8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
lib/window_bgm.rb
lib/window_bgm.rb
+6
-5
No files found.
lib/window_bgm.rb
View file @
9d6c04cd
require_relative
'window'
class
Window_BGM
<
Window
WLH
=
20
def
initialize
(
bgm_name
)
@bgm_name
=
bgm_name
@font
=
TTF
.
open
(
"fonts/WenQuanYi Micro Hei.ttf"
,
18
)
width
=
@font
.
text_size
(
"♪
#{
@bgm_name
}
"
)[
0
]
@count
=
0
@contents
=
@font
.
render_blended_utf8
(
"♪
#{
@bgm_name
}
"
,
255
,
255
,
255
)
super
(
$config
[
'screen'
][
'width'
]
,
0
,
width
,
24
,
999
)
super
(
$config
[
'screen'
][
'width'
]
-
width
,
-
WLH
,
width
,
WLH
,
999
)
end
def
update
if
@count
>=
180
if
@
x
>=
$config
[
'screen'
][
'width'
]
if
@
y
<=
-
WLH
self
.
destroy
else
self
.
x
+=
1.5
self
.
y
-=
1
end
elsif
$config
[
'screen'
][
'width'
]
-
@x
<
@width
self
.
x
-=
1.5
elsif
@y
<
0
self
.
y
+=
1
else
@count
+=
1
end
...
...
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