From 6a2806968028a9902d703ad8b62bfdbad3bce418 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Mon, 28 Jan 2019 10:00:36 +0100 Subject: [PATCH] src/core: improve style in the assets module --- sonic-radiance.love/core/modules/assets/animator.lua | 4 ++-- sonic-radiance.love/core/modules/assets/autotile.lua | 2 +- sonic-radiance.love/core/modules/assets/background.lua | 2 +- sonic-radiance.love/core/modules/assets/fonts.lua | 4 ++-- sonic-radiance.love/core/modules/assets/init.lua | 10 +++++----- sonic-radiance.love/core/modules/assets/sprites.lua | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sonic-radiance.love/core/modules/assets/animator.lua b/sonic-radiance.love/core/modules/assets/animator.lua index c92efb3..41d28ea 100644 --- a/sonic-radiance.love/core/modules/assets/animator.lua +++ b/sonic-radiance.love/core/modules/assets/animator.lua @@ -47,11 +47,11 @@ end function Animator:changeAnimation(name, restart) self.currentAnimation = name - self.animationData = self.sprite.data.animations[self.currentAnimation] + self.animationData = self.sprite.data.animations[self.currentAnimation] local restart = restart or true if (restart) then - self.frame = self.animationData.startAt + self.frame = self.animationData.startAt self.frameTimer = 0 end end diff --git a/sonic-radiance.love/core/modules/assets/autotile.lua b/sonic-radiance.love/core/modules/assets/autotile.lua index 8722044..ba1f99a 100644 --- a/sonic-radiance.love/core/modules/assets/autotile.lua +++ b/sonic-radiance.love/core/modules/assets/autotile.lua @@ -4,7 +4,7 @@ local Autotile = Object:extend() function Autotile:new(filepath) self.tileset = Tileset(filepath) - self.data = require(filepath .. ".lua") + self.data = require(filepath .. ".lua") self.metadata = self.data.metadata self.tilesize = self.metadata.width diff --git a/sonic-radiance.love/core/modules/assets/background.lua b/sonic-radiance.love/core/modules/assets/background.lua index eb6d6e0..5d7263b 100644 --- a/sonic-radiance.love/core/modules/assets/background.lua +++ b/sonic-radiance.love/core/modules/assets/background.lua @@ -1,7 +1,7 @@ local Background = Object:extend() function Background:new(filepath) - self.image = love.graphics.newImage(filepath) + self.image = love.graphics.newImage(filepath) self.batch = love.graphics.newSpriteBatch(self.image , 1000 ) self.width, self.height = self.image:getDimensions() diff --git a/sonic-radiance.love/core/modules/assets/fonts.lua b/sonic-radiance.love/core/modules/assets/fonts.lua index 2a7c0cd..ad2a8d3 100644 --- a/sonic-radiance.love/core/modules/assets/fonts.lua +++ b/sonic-radiance.love/core/modules/assets/fonts.lua @@ -4,11 +4,11 @@ local Font = Object:extend() function Font:new(filename, size) local filename = filename - self.font = love.graphics.newFont(filename, size) + self.font = love.graphics.newFont(filename, size) self.filter = "" self:setColor(1, 1, 1, 1) self:setSpacing(false, 0) - self.align = "left" + self.align = "left" end function Font:set() diff --git a/sonic-radiance.love/core/modules/assets/init.lua b/sonic-radiance.love/core/modules/assets/init.lua index dde730b..d38bc47 100644 --- a/sonic-radiance.love/core/modules/assets/init.lua +++ b/sonic-radiance.love/core/modules/assets/init.lua @@ -1,10 +1,10 @@ local Assets = Object:extend() -local Sprite = require "core.modules.assets.sprites" -local Font = require "core.modules.assets.fonts" -local Tileset = require "core.modules.assets.tileset" -local Autotile = require "core.modules.assets.autotile" -local Background = require "core.modules.assets.background" +local Sprite = require "core.modules.assets.sprites" +local Font = require "core.modules.assets.fonts" +local Tileset = require "core.modules.assets.tileset" +local Autotile = require "core.modules.assets.autotile" +local Background = require "core.modules.assets.background" function Assets:new() diff --git a/sonic-radiance.love/core/modules/assets/sprites.lua b/sonic-radiance.love/core/modules/assets/sprites.lua index 901f2bc..654a2cf 100644 --- a/sonic-radiance.love/core/modules/assets/sprites.lua +++ b/sonic-radiance.love/core/modules/assets/sprites.lua @@ -7,7 +7,7 @@ local Tileset = require("core.modules.assets.tileset") function Sprite:new(filepath) self.tileset = Tileset(filepath) - self.data = require(filepath) + self.data = require(filepath) self.animator = Animator(self)