From 4806ef5c6f167b4195e6f03d547de42e8f06593b Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Mon, 6 Jan 2014 18:26:14 +0800 Subject: [PATCH] change time of initialization --- .../NewEventDispatcherTest.cpp | 13 +++++++++---- .../NewEventDispatcherTest/NewEventDispatcherTest.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp index b74ff5aaed..d23091db12 100644 --- a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp +++ b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -749,14 +749,19 @@ std::string RemoveListenerAfterAddingTest::subtitle() const // //DirectorEventTest // +DirectorEventTest::DirectorEventTest() +:_count1(0) +,_count2(0) +,_count3(0) +,_count4(0) +{ + +} + void DirectorEventTest::onEnter() { EventDispatcherTestDemo::onEnter(); - _count1 = 0; - _count2 = 0; - _count3 = 0; - _count4 = 0; Size s = Director::getInstance()->getWinSize(); _label1 = Label::createWithTTF("Update: 0", "fonts/arial.ttf", 20); diff --git a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h index 0512b3c31d..2de772a6af 100644 --- a/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h +++ b/samples/Cpp/TestCpp/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h @@ -117,6 +117,7 @@ class DirectorEventTest : public EventDispatcherTestDemo { public: CREATE_FUNC(DirectorEventTest); + DirectorEventTest(); virtual void onEnter() override; virtual void onExit() override;