Class: Sprite
- Inherits:
- LiteRGSS::ShaderedSprite show all
- Defined in:
- docs/0_Dependencies.rb
Overview
Class that describe a sprite shown on the screen or inside a viewport
Direct Known Subclasses
BattleUI::TargetSelection::Button::Background, BattleUI::TrainerPartyBalls::BallSprite, NuriYuri::DynamicLight::DynamicLightSprite, Plane, RPG::Sprite, ShaderedSprite, WithColor, UI::AudienceHeartSprite, UI::Bag::Arrow, UI::Casino::BandDisplay, UI::CurtainSprite, UI::Hall_of_Fame::Turning_Pokeball, UI::HoldSprite, UI::ItemSprite, UI::JKeyBinding, UI::KeyShortcut, UI::MiningGame::Background, UI::MiningGame::KeyboardCursor, UI::Options::Arrow, UI::PokemonFaceSprite, UI::PokemonFootSprite, UI::Quest::Arrow, UI::Quest::QuestFrame, UI::RealHoldSprite, UI::Shop::ShopBanner, UI::VoltorbFlip::Cursor, UI::VoltorbFlip::MemoTile
Defined Under Namespace
Classes: WithColor
Instance Attribute Summary
Attributes inherited from LiteRGSS::ShaderedSprite
Attributes inherited from LiteRGSS::Sprite
#__index__, #angle, #bitmap, #height, #mirror, #opacity, #ox, #oy, #src_rect, #viewport, #visible, #width, #x, #y, #z, #zoom, #zoom_x, #zoom_y
Instance Method Summary collapse
-
#load(texture, cache = nil, auto_rect = false) ⇒ self
(also: #set_bitmap)
Set the texture show on the screen surface.
-
#mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Boolean
Detect if the mouse is in the sprite (without rotation).
-
#set_origin_div(ox, oy) ⇒ self
define the pixel of the bitmap that is shown at the coordinate of the sprite.
-
#set_rect(x, y, width, height) ⇒ self
Define the surface of the bitmap that is shown on the screen surface.
-
#set_rect_div(x, y, width, height) ⇒ self
Define the surface of the bitmap that is shown with division of it.
-
#set_z(z) ⇒ self
define the superiority of the sprite.
-
#simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Boolean
Detect if the mouse is in the sprite (without rotation and stuff like that).
-
#translate_mouse_coords(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Array(Integer, Integer)
Convert mouse coordinate on the screen to mouse coordinates on the sprite.
-
#update
RGSS Compatibility "update" the sprite.
Methods inherited from LiteRGSS::Sprite
#initialize, #set_origin, #set_position
Methods inherited from LiteRGSS::Disposable
Constructor Details
This class inherits a constructor from LiteRGSS::Sprite
Instance Method Details
#load(filename, cache_symbol) ⇒ self #load(bmp) ⇒ self Also known as: set_bitmap
Set the texture show on the screen surface
1478 1479 |
# File 'docs/0_Dependencies.rb', line 1478 def load(texture, cache = nil, auto_rect = false) end |
#mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Boolean
Detect if the mouse is in the sprite (without rotation)
1506 1507 |
# File 'docs/0_Dependencies.rb', line 1506 def mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) end |
#set_origin_div(ox, oy) ⇒ self
define the pixel of the bitmap that is shown at the coordinate of the sprite. The width and the height is divided by ox and oy to determine the pixel
1452 1453 |
# File 'docs/0_Dependencies.rb', line 1452 def set_origin_div(ox, oy) end |
#set_rect(x, y, width, height) ⇒ self
Define the surface of the bitmap that is shown on the screen surface
1460 1461 |
# File 'docs/0_Dependencies.rb', line 1460 def set_rect(x, y, width, height) end |
#set_rect_div(x, y, width, height) ⇒ self
Define the surface of the bitmap that is shown with division of it
1468 1469 |
# File 'docs/0_Dependencies.rb', line 1468 def set_rect_div(x, y, width, height) end |
#set_z(z) ⇒ self
define the superiority of the sprite
1445 1446 |
# File 'docs/0_Dependencies.rb', line 1445 def set_z(z) end |
#simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Boolean
Detect if the mouse is in the sprite (without rotation and stuff like that)
1499 1500 |
# File 'docs/0_Dependencies.rb', line 1499 def simple_mouse_in?(mouse_x = Mouse.x, mouse_y = Mouse.y) end |
#translate_mouse_coords(mouse_x = Mouse.x, mouse_y = Mouse.y) ⇒ Array(Integer, Integer)
Convert mouse coordinate on the screen to mouse coordinates on the sprite
1513 1514 |
# File 'docs/0_Dependencies.rb', line 1513 def translate_mouse_coords(mouse_x = Mouse.x, mouse_y = Mouse.y) end |
#update
RGSS Compatibility "update" the sprite
1440 1441 |
# File 'docs/0_Dependencies.rb', line 1440 def update end |