Merge branch 'main' into fix/cmake-libs-2

This commit is contained in:
David Markowitz
2024-03-03 04:17:27 -08:00
committed by GitHub
475 changed files with 5755 additions and 6213 deletions

View File

@@ -22,6 +22,7 @@ add_library(dScriptsZone OBJECT ${DSCRIPTS_SOURCES_ZONE})
target_include_directories(dScriptsZone PUBLIC "."
"AG"
"LUPs"
"LUPs/RobotCity_Intro"
"PROPERTY"
"PROPERTY/FV"
"PROPERTY/GF"

View File

@@ -1,3 +1,11 @@
set(DSCRIPTS_SOURCES_ZONE_LUPS
set(DSCRIPTS_SOURCES_ZONE_LUPS
"WblGenericZone.cpp"
PARENT_SCOPE)
)
add_subdirectory(RobotCity_Intro)
foreach(file ${DSCRIPTS_SOURCES_ZONE_LUPS_ROBOTCITYINTRO})
set(DSCRIPTS_SOURCES_ZONE_LUPS ${DSCRIPTS_SOURCES_ZONE_LUPS} "RobotCity_Intro/${file}")
endforeach()
set(DSCRIPTS_SOURCES_ZONE_LUPS ${DSCRIPTS_SOURCES_ZONE_LUPS} PARENT_SCOPE)

View File

@@ -0,0 +1,3 @@
set(DSCRIPTS_SOURCES_ZONE_LUPS_ROBOTCITYINTRO
"WblRobotCitizen.cpp"
PARENT_SCOPE)

View File

@@ -0,0 +1,24 @@
#include "WblRobotCitizen.h"
#include "MovementAIComponent.h"
#include "RenderComponent.h"
void WblRobotCitizen::OnStartup(Entity* self) {
auto movementAIComponent = self->GetComponent<MovementAIComponent>();
if (!movementAIComponent) return;
// movementAIComponent->Resume();
}
void WblRobotCitizen::OnUse(Entity* self, Entity* user) {
// auto movementAIComponent = self->GetComponent<MovementAIComponent>();
// if (!movementAIComponent) movementAIComponent->Pause();
auto face = NiQuaternion::LookAt(self->GetPosition(), user->GetPosition());
self->SetRotation(face);
auto timer = RenderComponent::PlayAnimation(self, "wave");
self->AddTimer("animation time", timer);
}
void WblRobotCitizen::OnTimerDone(Entity* self, std::string timerName) {
auto movementAIComponent = self->GetComponent<MovementAIComponent>();
if (!movementAIComponent) return;
// movementAIComponent->Resume();
}

View File

@@ -0,0 +1,13 @@
#ifndef __WBLROBOTCITIZEN__H__
#define __WBLROBOTCITIZEN__H__
#include "CppScripts.h"
class WblRobotCitizen : public CppScripts::Script {
public:
void OnStartup(Entity* self) override;
void OnUse(Entity* self, Entity* user) override;
void OnTimerDone(Entity* self, std::string timerName) override;
};
#endif //!__WBLROBOTCITIZEN__H__