From 2662ac356ce14dacfbc91689fd37244facff4989 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Fri, 30 Aug 2019 00:14:27 -0400 Subject: Added Name and Render components to Lua --- src/components/Position.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/components') diff --git a/src/components/Position.hpp b/src/components/Position.hpp index 8684a7f..1c6cf71 100644 --- a/src/components/Position.hpp +++ b/src/components/Position.hpp @@ -1,4 +1,5 @@ /** + * Copyright (C) 2019 Belle-Isle, Andrew * * This program is free software: you can redistribute it and/or modify @@ -26,11 +27,11 @@ struct Position : Component, entityx::Component public: float x,y; Position(float _x, float _y): x(_x), y(_y) {} - Position(void){x = y = 0.0;} + Position(void): x(0), y(0) {} Position FromLua(sol::object ref) { - if (ref.get_type() == sol::type::table){ + if (ref.get_type() == sol::type::table) { sol::table tab = ref; if (tab["x"] != nullptr) this->x = tab["x"]; -- cgit v1.2.3