This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "ComponentsConfig.h" | |
namespace Ursine | |
{ | |
// forward declarations | |
class Entity; | |
class EntityFilter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyFilterSystem : public FilterSystem | |
{ | |
public: | |
MyFilterSystem(World &world) | |
: FilterSystem(world, Filter().All<>().Exclude<>().One<>()) | |
{ | |
} | |
~MyFilterSystem(void) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct CollisionEventArgs : public EventArgs | |
{ | |
// bullet | |
Entity *sender; | |
// player | |
Entity *reciever; | |
// ... other collision related data | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<require from="resources-elements-nav-menu.html" as="nav-menu"></require> | |
<nav-menu router.bind="router"></nav-menu> | |
<h1>Aurelia Menu with Child Routes example</h1> | |
<div> | |
<router-view></router-view> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set(PROJECT_NAME "Example") | |
# assume this contains header files for this project | |
set(PROJECT_HEADER_FILES ...) | |
# assume this contains source files for this project | |
set(PROJECT_SOURCE_FILES ...) | |
# generated file names, in the build directory | |
set(META_GENERATED_HEADER "${CMAKE_CURRENT_BINARY_DIR}/Meta.Generated.h") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SoundEffect | |
{ | |
Meta(Range(0.0f, 100.0f)) | |
float volume; | |
}; | |
int main(void) | |
{ | |
// you can also use type meta::Type::Get( "SoundEffect" ) based on a string name | |
Type soundEffectType = typeof( SoundEffect ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum class SliderType | |
{ | |
Horizontal, | |
Vertical | |
}; | |
struct Slider : public MetaProperty | |
{ | |
SliderType type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SoundEffect | |
{ | |
float volume; | |
void Load(const std::string &filename); | |
}; | |
int main(void) | |
{ | |
Type soundEffectType = typeof( SoundEffect ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DemoClass | |
{ | |
public: | |
int someMethod(int a) | |
{ | |
return a; | |
} | |
}; | |
auto someMethodWrapper = [](Variant &obj, ArgumentList &args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int foo(int a, float b, double c) | |
{ | |
return 0; | |
} | |
auto fooWrapper = [](int a, float b, double c) | |
{ | |
return foo( a, b, c ); | |
}; |
OlderNewer