Component * SwitchComponent::Clone(SceneNode * toEntity)
{
	SwitchComponent * newComponent = new SwitchComponent();
	newComponent->SetEntity(toEntity);
	GlobalEventSystem::Instance()->Event(toEntity, this, EventSystem::SWITCH_CHANGED);
	return newComponent;
}
Esempio n. 2
0
Component * SwitchComponent::Clone(Entity * toEntity)
{
    SwitchComponent * newComponent = new SwitchComponent();
    newComponent->SetEntity(toEntity);
    newComponent->SetSwitchIndex(GetSwitchIndex());

    return newComponent;
}