init
This commit is contained in:
		
						commit
						001bb14f16
					
				
					 951 changed files with 270074 additions and 0 deletions
				
			
		
							
								
								
									
										37
									
								
								Assets/Scripts/Compass/Humo.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								Assets/Scripts/Compass/Humo.cs
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,37 @@ | |||
| using System.Collections; | ||||
| using System.Collections.Generic; | ||||
| using UnityEngine; | ||||
| using UnityEngine.UI; | ||||
| 
 | ||||
| public class Humo : MonoBehaviour, IPooledObject{ | ||||
| 
 | ||||
|     int transparencia; | ||||
|     float currentTrans; | ||||
|     float scale; | ||||
|     public float speed; | ||||
|     public float fadeSpeed; | ||||
|     public float scaleSpeed; | ||||
| 
 | ||||
|     HumoLookAt lookat; | ||||
|     RawImage image; | ||||
| 
 | ||||
|     // Start is called before the first frame update | ||||
|     public void OnObjectSpawn(){ | ||||
|         lookat = GetComponentInParent<HumoLookAt>(); | ||||
|         image = GetComponent<RawImage>(); | ||||
|         transparencia = Random.Range(25, 75); | ||||
|         currentTrans = transparencia; | ||||
|         scale = Random.Range(1f, 2.5f); | ||||
|         transform.localScale = new Vector3(scale, scale, scale); | ||||
|         image.color = new Color(image.color.r, image.color.g, image.color.b, currentTrans / 255); | ||||
|         transform.rotation = lookat.t; | ||||
|     } | ||||
| 
 | ||||
|     // Update is called once per frame | ||||
|     void Update(){ | ||||
|         transform.Translate(Vector2.up * speed * Time.deltaTime); | ||||
|         currentTrans = currentTrans - fadeSpeed; | ||||
|         image.color = new Color(image.color.r, image.color.g, image.color.b, currentTrans / 255); | ||||
|         image.transform.localScale = new Vector3(scale - scaleSpeed * Time.deltaTime, scale - scaleSpeed * Time.deltaTime, scale - scaleSpeed * Time.deltaTime); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										11
									
								
								Assets/Scripts/Compass/Humo.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								Assets/Scripts/Compass/Humo.cs.meta
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| fileFormatVersion: 2 | ||||
| guid: 8a8bd9c4625299f49b9ed371a00c56a0 | ||||
| MonoImporter: | ||||
|   externalObjects: {} | ||||
|   serializedVersion: 2 | ||||
|   defaultReferences: [] | ||||
|   executionOrder: 0 | ||||
|   icon: {instanceID: 0} | ||||
|   userData:  | ||||
|   assetBundleName:  | ||||
|   assetBundleVariant:  | ||||
							
								
								
									
										8
									
								
								Assets/Scripts/Compass/HumoLookAt.cs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								Assets/Scripts/Compass/HumoLookAt.cs
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| using System.Collections; | ||||
| using System.Collections.Generic; | ||||
| using UnityEngine; | ||||
| 
 | ||||
| public class HumoLookAt : MonoBehaviour{ | ||||
| 
 | ||||
|     public Quaternion t; | ||||
| } | ||||
							
								
								
									
										11
									
								
								Assets/Scripts/Compass/HumoLookAt.cs.meta
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								Assets/Scripts/Compass/HumoLookAt.cs.meta
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | |||
| fileFormatVersion: 2 | ||||
| guid: 16d7bcebca6755b4e919596bec218166 | ||||
| MonoImporter: | ||||
|   externalObjects: {} | ||||
|   serializedVersion: 2 | ||||
|   defaultReferences: [] | ||||
|   executionOrder: 0 | ||||
|   icon: {instanceID: 0} | ||||
|   userData:  | ||||
|   assetBundleName:  | ||||
|   assetBundleVariant:  | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Gerard Gascón
						Gerard Gascón