Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
import mnit::display
# General asset
import mnit::display
# General asset
end
# An String is an asset, returned from a text file
redef class String
end
# An String is an asset, returned from a text file
redef class String
end
# An Image is an asset
redef interface Image
end
# An Image is an asset
redef interface Image
end
redef class App
# Load a genereal asset from file name
# Will find the file within the assets/ directory
# Crashes if file not found
end
redef class App
# Load a genereal asset from file name
# Will find the file within the assets/ directory
# Crashes if file not found
- fun load_asset( id: String ): Asset
+ fun load_asset( id: String ): MnitAsset
do
var asset = try_loading_asset( id )
if asset == null then # error
do
var asset = try_loading_asset( id )
if asset == null then # error
end
# Load an assets without error if not found
end
# Load an assets without error if not found
- fun try_loading_asset( id: String ): nullable Asset is abstract
+ fun try_loading_asset( id: String ): nullable MnitAsset is abstract