mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-17 21:42:34 +00:00
Made Vector#operator private, refactored BoundingBox initializer to accept either Vectors or numbers, added #opacity to Common
This commit is contained in:
@@ -48,6 +48,12 @@ module CyberarmEngine
|
||||
end
|
||||
end
|
||||
|
||||
def opacity(color, ratio = 1.0)
|
||||
alpha = 255 * ratio
|
||||
|
||||
return Gosu::Color.rgba(color.red, color.green, color.blue, alpha)
|
||||
end
|
||||
|
||||
def get_asset(path, hash, klass)
|
||||
asset = nil
|
||||
hash.detect do |_asset, instance|
|
||||
|
||||
Reference in New Issue
Block a user