Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #204 from EternalWind/master

Bugs fixed
  • Loading branch information...
commit 5c4f0f3be636c0395d1f8020fd08eb01607bcd8a 2 parents eea38bc + 2b94259
@svenstaro svenstaro authored
View
6 data/scripts/circular_movement.js
@@ -1,17 +1,17 @@
var radius = 2;
var speed = 0.5; // rotations per second
-function OnCreate() {
+function OnInitialize() {
print("Component name property: " + this.component.name);
print("Node: " + this.component.node.name);
}
-function OnDestroy() {
+function OnDeinitialize() {
print("Destroying circular_path script component.");
}
function OnUpdate(time_diff) {
- this.component.node.SetPosition(
+ this.component.node.setPosition(
this.radius * Math.sin(TotalTime * 2 * Math.PI * this.speed),
this.radius * Math.cos(TotalTime * 2 * Math.PI * this.speed),
0);
View
3  engine/src/Input/InputManager.hpp
@@ -195,7 +195,8 @@ class DUCTTAPE_API InputManager : public Manager,
MC_BUTTON4 = 0xF2, // Mouse Button 4
MC_BUTTON5 = 0xF3, // Mouse Button 5
MC_BUTTON6 = 0xF4, // Mouse Button 6
- MC_BUTTON7 = 0xF5 // Mouse Button 7
+ MC_BUTTON7 = 0xF5, // Mouse Button 7
+ NONE = 0xFF // Invalid key
};
/**
View
4 engine/src/Logic/AdvancedPlayerComponent.hpp
@@ -6,8 +6,8 @@
// http://www.gnu.org/licenses/lgpl.html
// ----------------------------------------------------------------------------
-#ifndef DUCTTAPE_ENGINE_COMPONENT_AdvancedPlayerComponent
-#define DUCTTAPE_ENGINE_COMPONENT_AdvancedPlayerComponent
+#ifndef DUCTTAPE_ENGINE_COMPONENT_ADVANCEDPLAYERCOMPONENT
+#define DUCTTAPE_ENGINE_COMPONENT_ADVANCEDPLAYERCOMPONENT
#include <Config.hpp>
View
14 engine/src/Logic/SimplePlayerComponent.cpp
@@ -25,22 +25,22 @@ SimplePlayerComponent::SimplePlayerComponent(const QString name)
mMove(Ogre::Vector3::ZERO) {}
void SimplePlayerComponent::onInitialize() {
- if(!QObject::connect(InputManager::get(), SIGNAL(sPressed(dt::InputManager::InputCode input_code, const OIS::EventArg& event)),
- this, SLOT(_HandleKeyPressed(dt::InputManager::InputCode input_code,
- const OIS::EventArg& event)))) {
+ if(!QObject::connect(InputManager::get(), SIGNAL(sPressed(dt::InputManager::InputCode, const OIS::EventArg&)),
+ this, SLOT(_handleKeyPressed(dt::InputManager::InputCode,
+ const OIS::EventArg&)))) {
Logger::get().error("Cannot connect the key pressed signal with " + getName()
+ "'s keyboard input handling slot.");
}
if(mCostant) {
- if(!QObject::connect(InputManager::get(), SIGNAL(sReleased(dt::InputManager::InputCode input_code, const OIS::EventArg& event)),
- this, SLOT(_HandleKeyReleased(dt::InputManager::InputCode input_code,
- const OIS::EventArg& event)))) {
+ if(!QObject::connect(InputManager::get(), SIGNAL(sReleased(dt::InputManager::InputCode, const OIS::EventArg&)),
+ this, SLOT(_handleKeyReleased(dt::InputManager::InputCode,
+ const OIS::EventArg&)))) {
Logger::get().error("Cannot connect the key released signal with " + getName()
+ "'s keyboard input handling slot.");
}
}
if(!QObject::connect(InputManager::get(), SIGNAL(sMouseMoved(const OIS::MouseEvent&)),
- this, SLOT(_HandleMouseInput(const OIS::MouseEvent&)))) {
+ this, SLOT(_handleMouseInput(const OIS::MouseEvent&)))) {
Logger::get().error("Cannot connect the mouse moved signal with " + getName()
+ "'s mouse input handling slot.");
}
View
2  tests/src/ScriptComponentTest/ScriptComponentTest.cpp
@@ -52,7 +52,7 @@ void Main::onInitialize() {
auto meshnode = scene->addChildNode(new dt::Node("meshnode"));
dt::MeshComponent* mesh = new dt::MeshComponent("Sinbad.mesh");
meshnode->addComponent(mesh);
- meshnode->addComponent(new dt::ScriptComponent("circular_movement.js", "script"));
+ meshnode->addComponent(new dt::ScriptComponent("circular_movement.js", "script", true));
}
Please sign in to comment.
Something went wrong with that request. Please try again.