public void Setup() { GameObject crossHairGo = Object.Instantiate(new GameObject()); crossHairController = crossHairGo.AddComponent <CrossHairController>(); GameObject raycasterGo = Object.Instantiate(new GameObject()); rayCastControllerMock = raycasterGo.AddComponent <RayCastControllerMock>(); }
public void InstCursor() { if (HasWeapon()) { _cursor = Instantiate(_wpn.crossHairPrefab); } else { _cursor = Instantiate(_defaultCursor); } }
void Start() { crossHairC = CH_and_ray.GetComponent <CrossHairController>(); rayManager = CH_and_ray.GetComponent <RayManager>(); weaponH = WeaponHold.none; // 총알 만들기 for (int i = 0; i < bulletAmount; i++) { GameObject bullet = Instantiate(bulletPrefab); bullet.SetActive(false); bulletPool.Add(bullet); } }
private void Start() { CHC = GetComponent <CrossHairController>(); }