You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			21 lines
		
	
	
		
			624 B
		
	
	
	
		
			C#
		
	
		
		
			
		
	
	
			21 lines
		
	
	
		
			624 B
		
	
	
	
		
			C#
		
	
| 
								 
											1 year ago
										 
									 | 
							
								using UnityEngine;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								namespace Autohand {
							 | 
						||
| 
								 | 
							
								    [RequireComponent(typeof(Grabbable)), HelpURL("https://app.gitbook.com/s/5zKO0EvOjzUDeT2aiFk3/auto-hand/auto-hand-player#climbing")]
							 | 
						||
| 
								 | 
							
								    public class Climbable : MonoBehaviour{
							 | 
						||
| 
								 | 
							
								        public Vector3 axis = Vector3.one;
							 | 
						||
| 
								 | 
							
								        public Stabber stabber;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        private void Start() {
							 | 
						||
| 
								 | 
							
								            if(stabber != null) {
							 | 
						||
| 
								 | 
							
								                stabber.StartStabEvent += (hand, grab) => {
							 | 
						||
| 
								 | 
							
								                    enabled = true;
							 | 
						||
| 
								 | 
							
								                };
							 | 
						||
| 
								 | 
							
								                stabber.EndStabEvent += (hand, grab) => {
							 | 
						||
| 
								 | 
							
								                    enabled = false;
							 | 
						||
| 
								 | 
							
								                };
							 | 
						||
| 
								 | 
							
								            }
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |