mirror of
https://github.com/enduro2d/enduro2d.git
synced 2026-01-08 15:09:45 +07:00
add dummy behaviour component
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "assets/xml_asset.hpp"
|
||||
|
||||
#include "components/actor.hpp"
|
||||
#include "components/behaviour.hpp"
|
||||
#include "components/camera.hpp"
|
||||
#include "components/flipbook_player.hpp"
|
||||
#include "components/flipbook_source.hpp"
|
||||
|
||||
@@ -37,6 +37,7 @@ namespace e2d
|
||||
class xml_asset;
|
||||
|
||||
class actor;
|
||||
class behaviour;
|
||||
class camera;
|
||||
class flipbook_player;
|
||||
class flipbook_source;
|
||||
|
||||
33
headers/enduro2d/high/components/behaviour.hpp
Normal file
33
headers/enduro2d/high/components/behaviour.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "Enduro2D"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "../_high.hpp"
|
||||
|
||||
#include "../factory.hpp"
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
class behaviour final {
|
||||
public:
|
||||
behaviour() = default;
|
||||
};
|
||||
|
||||
template <>
|
||||
class factory_loader<behaviour> final : factory_loader<> {
|
||||
public:
|
||||
static const char* schema_source;
|
||||
|
||||
bool operator()(
|
||||
behaviour& component,
|
||||
const fill_context& ctx) const;
|
||||
|
||||
bool operator()(
|
||||
asset_dependencies& dependencies,
|
||||
const collect_context& ctx) const;
|
||||
};
|
||||
}
|
||||
33
sources/enduro2d/high/components/behaviour.cpp
Normal file
33
sources/enduro2d/high/components/behaviour.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
/*******************************************************************************
|
||||
* This file is part of the "Enduro2D"
|
||||
* For conditions of distribution and use, see copyright notice in LICENSE.md
|
||||
* Copyright (C) 2018-2019, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
******************************************************************************/
|
||||
|
||||
#include <enduro2d/high/components/behaviour.hpp>
|
||||
|
||||
namespace e2d
|
||||
{
|
||||
const char* factory_loader<behaviour>::schema_source = R"json({
|
||||
"type" : "object",
|
||||
"required" : [],
|
||||
"additionalProperties" : false,
|
||||
"properties" : {}
|
||||
})json";
|
||||
|
||||
bool factory_loader<behaviour>::operator()(
|
||||
behaviour& component,
|
||||
const fill_context& ctx) const
|
||||
{
|
||||
E2D_UNUSED(component, ctx);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool factory_loader<behaviour>::operator()(
|
||||
asset_dependencies& dependencies,
|
||||
const collect_context& ctx) const
|
||||
{
|
||||
E2D_UNUSED(dependencies, ctx);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <enduro2d/high/library.hpp>
|
||||
|
||||
#include <enduro2d/high/components/actor.hpp>
|
||||
#include <enduro2d/high/components/behaviour.hpp>
|
||||
#include <enduro2d/high/components/camera.hpp>
|
||||
#include <enduro2d/high/components/flipbook_player.hpp>
|
||||
#include <enduro2d/high/components/flipbook_source.hpp>
|
||||
@@ -127,6 +128,7 @@ namespace e2d
|
||||
safe_module_initialize<engine>(argc, argv, params.engine_params());
|
||||
safe_module_initialize<factory>()
|
||||
.register_component<actor>("actor")
|
||||
.register_component<behaviour>("behaviour")
|
||||
.register_component<camera>("camera")
|
||||
.register_component<flipbook_player>("flipbook_player")
|
||||
.register_component<flipbook_source>("flipbook_source")
|
||||
|
||||
Reference in New Issue
Block a user