TagComponent
- Added TagComponent
This commit is contained in:
		
							parent
							
								
									c846e48c71
								
							
						
					
					
						commit
						8367150145
					
				
					 2 changed files with 26 additions and 1 deletions
				
			
		| 
						 | 
					@ -5,4 +5,5 @@
 | 
				
			||||||
#include "Components/CameraComponent.h"
 | 
					#include "Components/CameraComponent.h"
 | 
				
			||||||
#include "Components/NativeScriptComponent.h"
 | 
					#include "Components/NativeScriptComponent.h"
 | 
				
			||||||
#include "Components/SpriteRendererComponent.h"
 | 
					#include "Components/SpriteRendererComponent.h"
 | 
				
			||||||
#include "Components/TransformComponent.h"
 | 
					#include "Components/TransformComponent.h"
 | 
				
			||||||
 | 
					#include "Components/TagComponent.h"
 | 
				
			||||||
							
								
								
									
										24
									
								
								Engine/src/Engine/Scene/Components/TagComponent.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								Engine/src/Engine/Scene/Components/TagComponent.h
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					#pragma once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "Base/Base.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					namespace Light {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						struct TagComponent
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							std::string tag = "Unnamed";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							TagComponent() = default;
 | 
				
			||||||
 | 
							TagComponent(const TagComponent&) = default;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							TagComponent(const char* _tag)
 | 
				
			||||||
 | 
								: tag(_tag)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							operator std::string() { return tag; }
 | 
				
			||||||
 | 
							operator const std::string&() const { return tag; }
 | 
				
			||||||
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue