This commit is contained in:
LeeJaeHyun 2024-09-12 15:36:18 +09:00
parent ae349648ae
commit f730aa709a

View File

@ -55,7 +55,13 @@ public class WeaponController : MonoBehaviour
Random.Range(0, 10) : 0, 1, 2, ..., 9 Random.Range(0, 10) : 0, 1, 2, ..., 9
Random.Range(0.0f, 10.0f) : 0.0f ~ 10.0f Random.Range(0.0f, 10.0f) : 0.0f ~ 10.0f
*/ */
Vector2 offset = new Vector2(Random.Range(0, 2), Random.Range(0, 2)) Vector2 offset = new Vector2(Random.Range(0, 2), Random.Range(0, 2)) * 0.5f;
// 텍스처의 오프셋 변경
muzzleFlash.material.mainTextureOffset = offset;
// 스케일 변경
Vector3 scale = Vector3.one * Random.Range(1.0f, 3.0f);
muzzleFlash.transform.localScale = scale;
// Waiting... // Waiting...
yield return new WaitForSeconds(0.2f); yield return new WaitForSeconds(0.2f);