Skip to content

Commit

Permalink
Deleted platform files, small edits, deleted bus
Browse files Browse the repository at this point in the history
Signed-off-by: Judy Ng <[email protected]>
  • Loading branch information
judysng committed Jul 27, 2022
1 parent 3fcdc3a commit ec4f695
Show file tree
Hide file tree
Showing 30 changed files with 33 additions and 244 deletions.
Empty file removed atom_gems/AtomTutorials/.gitignore
Empty file.
75 changes: 30 additions & 45 deletions atom_gems/AtomTutorials/Code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@
# <restricted_folder>/<platform_name>/Gems/AtomTutorials/Code
o3de_pal_dir(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")

# Now that we have the platform abstraction layer (PAL) folder for this folder, thats where we will find the
# traits for this platform. Traits for a platform are defines for things like whether or not something in this gem
# is supported by this platform.
include(${pal_dir}/PAL_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)

# The AtomTutorials.API target declares the common interface that users of this gem should depend on in their targets
ly_add_target(
NAME AtomTutorials.API INTERFACE
NAMESPACE Gem
FILES_CMAKE
atomtutorials_api_files.cmake
${pal_dir}/atomtutorials_api_files.cmake
INCLUDE_DIRECTORIES
INTERFACE
Include
Expand All @@ -34,7 +28,6 @@ ly_add_target(
NAMESPACE Gem
FILES_CMAKE
atomtutorials_private_files.cmake
${pal_dir}/atomtutorials_private_files.cmake
TARGET_PROPERTIES
O3DE_PRIVATE_TARGET TRUE
INCLUDE_DIRECTORIES
Expand All @@ -53,7 +46,6 @@ ly_add_target(
NAMESPACE Gem
FILES_CMAKE
atomtutorials_shared_files.cmake
${pal_dir}/atomtutorials_shared_files.cmake
INCLUDE_DIRECTORIES
PUBLIC
Include
Expand Down Expand Up @@ -84,7 +76,6 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
NAMESPACE Gem
FILES_CMAKE
atomtutorials_editor_api_files.cmake
${pal_dir}/atomtutorials_editor_api_files.cmake
INCLUDE_DIRECTORIES
INTERFACE
Include
Expand Down Expand Up @@ -150,56 +141,50 @@ endif()
################################################################################
# See if globally, tests are supported
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
# We globally support tests, see if we support tests on this platform for AtomTutorials.Tests
if(PAL_TRAIT_ATOMTUTORIALS_TEST_SUPPORTED)
# We support AtomTutorials.Tests on this platform, add dependency on the Private Object target
# We support AtomTutorials.Tests on this platform, add dependency on the Private Object target
ly_add_target(
NAME AtomTutorials.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
atomtutorials_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
Source
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
AZ::AzFramework
Gem::AtomTutorials.Private.Object
)

# Add AtomTutorials.Tests to googletest
ly_add_googletest(
NAME Gem::AtomTutorials.Tests
)

# If we are a host platform we want to add tools test like editor tests here
if(PAL_TRAIT_BUILD_HOST_TOOLS)
# We support AtomTutorials.Editor.Tests on this platform, add AtomTutorials.Editor.Tests target which depends on
# private AtomTutorials.Editor.Private.Object target
ly_add_target(
NAME AtomTutorials.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAME AtomTutorials.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
atomtutorials_tests_files.cmake
atomtutorials_editor_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
Source
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
AZ::AzFramework
Gem::AtomTutorials.Private.Object
)

# Add AtomTutorials.Tests to googletest
# Add AtomTutorials.Editor.Tests to googletest
ly_add_googletest(
NAME Gem::AtomTutorials.Tests
NAME Gem::AtomTutorials.Editor.Tests
)
endif()

# If we are a host platform we want to add tools test like editor tests here
if(PAL_TRAIT_BUILD_HOST_TOOLS)
# We are a host platform, see if Editor tests are supported on this platform
if(PAL_TRAIT_ATOMTUTORIALS_EDITOR_TEST_SUPPORTED)
# We support AtomTutorials.Editor.Tests on this platform, add AtomTutorials.Editor.Tests target which depends on
# private AtomTutorials.Editor.Private.Object target
ly_add_target(
NAME AtomTutorials.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
NAMESPACE Gem
FILES_CMAKE
atomtutorials_editor_tests_files.cmake
INCLUDE_DIRECTORIES
PRIVATE
Tests
Source
BUILD_DEPENDENCIES
PRIVATE
AZ::AzTest
Gem::AtomTutorials.Private.Object
)

# Add AtomTutorials.Editor.Tests to googletest
ly_add_googletest(
NAME Gem::AtomTutorials.Editor.Tests
)
endif()
endif()
endif()

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions atom_gems/AtomTutorials/Code/Platform/Linux/PAL_linux.cmake

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions atom_gems/AtomTutorials/Code/Platform/Mac/PAL_mac.cmake

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions atom_gems/AtomTutorials/Code/Platform/iOS/PAL_ios.cmake

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,39 +44,15 @@ namespace AtomTutorials
{
}

AtomTutorialsSystemComponent::AtomTutorialsSystemComponent()
{
if (AtomTutorialsInterface::Get() == nullptr)
{
AtomTutorialsInterface::Register(this);
}
}

AtomTutorialsSystemComponent::~AtomTutorialsSystemComponent()
{
if (AtomTutorialsInterface::Get() == this)
{
AtomTutorialsInterface::Unregister(this);
}
}

void AtomTutorialsSystemComponent::Init()
{
}

void AtomTutorialsSystemComponent::Activate()
{
AtomTutorialsRequestBus::Handler::BusConnect();
AZ::TickBus::Handler::BusConnect();
}

void AtomTutorialsSystemComponent::Deactivate()
{
AZ::TickBus::Handler::BusDisconnect();
AtomTutorialsRequestBus::Handler::BusDisconnect();
}

void AtomTutorialsSystemComponent::OnTick([[maybe_unused]] float deltaTime, [[maybe_unused]] AZ::ScriptTimePoint time)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
#pragma once

#include <AzCore/Component/Component.h>
#include <AzCore/Component/TickBus.h>
#include <AtomTutorials/AtomTutorialsBus.h>

namespace AtomTutorials
{
class AtomTutorialsSystemComponent
: public AZ::Component
, protected AtomTutorialsRequestBus::Handler
, public AZ::TickBus::Handler
{
public:
AZ_COMPONENT(AtomTutorialsSystemComponent, "{301F9A4A-0D92-4E7C-9D8B-41DF80624A18}");
Expand All @@ -22,26 +18,14 @@ namespace AtomTutorials
static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);

AtomTutorialsSystemComponent();
~AtomTutorialsSystemComponent();

protected:
////////////////////////////////////////////////////////////////////////
// AtomTutorialsRequestBus interface implementation

////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
// AZ::Component interface implementation
void Init() override;
void Activate() override;
void Deactivate() override;
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
// AZTickBus interface implementation
void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
////////////////////////////////////////////////////////////////////////
};

} // namespace AtomTutorials
1 change: 0 additions & 1 deletion atom_gems/AtomTutorials/Code/atomtutorials_api_files.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

set(FILES
Include/AtomTutorials/AtomTutorialsBus.h
)
Loading

0 comments on commit ec4f695

Please sign in to comment.