.
This commit is contained in:
parent
79f60a877e
commit
ae349648ae
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Unity.Cinemachine;
|
||||
using System;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
[RequireComponent(typeof(AudioSource))]
|
||||
public class WeaponController : MonoBehaviour
|
||||
@ -48,6 +49,14 @@ public class WeaponController : MonoBehaviour
|
||||
//MuzzleFlash 활성화
|
||||
muzzleFlash.enabled = true;
|
||||
|
||||
// 텍스처의 Offset 값을 추출 (0, 0), (0.5, 0), (0.5, 0.5), (0, 0.5) => 0, 0.5
|
||||
// 난수 발생
|
||||
/*
|
||||
Random.Range(0, 10) : 0, 1, 2, ..., 9
|
||||
Random.Range(0.0f, 10.0f) : 0.0f ~ 10.0f
|
||||
*/
|
||||
Vector2 offset = new Vector2(Random.Range(0, 2), Random.Range(0, 2))
|
||||
|
||||
// Waiting...
|
||||
yield return new WaitForSeconds(0.2f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user