| 
									
										
										
										
											2021-02-15 13:14:42 +00:00
										 |  |  | using System.Collections; | 
					
						
							|  |  |  | using System.Collections.Generic; | 
					
						
							|  |  |  | using UnityEngine; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public class RespawnManager : MonoBehaviour | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |     private Vector3 respawnPoint; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-15 16:23:29 +00:00
										 |  |  |     // Set respawn point in Respawn Manager. | 
					
						
							|  |  |  |     public void SetRespawnPoint(Vector3 _respawnPoint) | 
					
						
							| 
									
										
										
										
											2021-02-15 13:14:42 +00:00
										 |  |  |     { | 
					
						
							|  |  |  |         respawnPoint = _respawnPoint; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-15 16:23:29 +00:00
										 |  |  |     // Return the respawn point. | 
					
						
							|  |  |  |     public Vector3 GetRespawnPoint() | 
					
						
							| 
									
										
										
										
											2021-02-15 13:14:42 +00:00
										 |  |  |     { | 
					
						
							|  |  |  |         return respawnPoint; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-02-15 16:23:29 +00:00
										 |  |  |     // Show current respawn point in log. This can be deleted at later stage. | 
					
						
							| 
									
										
										
										
											2021-02-15 13:14:42 +00:00
										 |  |  |     private void Update() | 
					
						
							|  |  |  |     { | 
					
						
							|  |  |  |         Debug.Log(respawnPoint); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |