負荷対策 アイテムのパーティクルPrefab化
This commit is contained in:
		
							parent
							
								
									0b04f5135e
								
							
						
					
					
						commit
						35c0b6ca32
					
				
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -0,0 +1,7 @@ | ||||||
|  | fileFormatVersion: 2 | ||||||
|  | guid: 69692b57b25f34f368ee8630f9335287 | ||||||
|  | PrefabImporter: | ||||||
|  |   externalObjects: {} | ||||||
|  |   userData:  | ||||||
|  |   assetBundleName:  | ||||||
|  |   assetBundleVariant:  | ||||||
|  | @ -18,7 +18,8 @@ namespace MyGame.Scenes.MiniGame.Scripts | ||||||
|         [SerializeField] private Type itemType; |         [SerializeField] private Type itemType; | ||||||
|         public Type ItemType => itemType; |         public Type ItemType => itemType; | ||||||
|         [SerializeField] private int point; |         [SerializeField] private int point; | ||||||
|         [SerializeField] private GameObject effect; |         [SerializeField] private Transform effectTarget; | ||||||
|  |         [SerializeField] private Transform effectPrefab; | ||||||
| 
 | 
 | ||||||
|         public int Point => point; |         public int Point => point; | ||||||
| 
 | 
 | ||||||
|  | @ -29,7 +30,7 @@ namespace MyGame.Scenes.MiniGame.Scripts | ||||||
|             { |             { | ||||||
|                 case Type.Item1: |                 case Type.Item1: | ||||||
|                     transform.SetLocalScale(0f); |                     transform.SetLocalScale(0f); | ||||||
|                     if (effect != null) effect.SetActive(true); |                     Instantiate(effectPrefab, effectTarget.position, Quaternion.identity, effectTarget); | ||||||
|                     break; |                     break; | ||||||
|                 case Type.Obstacle: |                 case Type.Obstacle: | ||||||
|                 case Type.Hole: |                 case Type.Hole: | ||||||
|  | @ -38,11 +39,5 @@ namespace MyGame.Scenes.MiniGame.Scripts | ||||||
|                     throw new ArgumentOutOfRangeException(); |                     throw new ArgumentOutOfRangeException(); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|         public void ResetItem() |  | ||||||
|         { |  | ||||||
|             transform.SetLocalScale(1f); |  | ||||||
|             if (effect != null) effect.SetActive(false); |  | ||||||
|         } |  | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue