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