public void Setup()
        {
            GameObject crossHairGo = Object.Instantiate(new GameObject());

            crossHairController = crossHairGo.AddComponent <CrossHairController>();

            GameObject raycasterGo = Object.Instantiate(new GameObject());

            rayCastControllerMock = raycasterGo.AddComponent <RayCastControllerMock>();
        }
Esempio n. 2
0
 public void InstCursor()
 {
     if (HasWeapon())
     {
         _cursor = Instantiate(_wpn.crossHairPrefab);
     }
     else
     {
         _cursor = Instantiate(_defaultCursor);
     }
 }
Esempio n. 3
0
    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);
        }
    }
Esempio n. 4
0
 private void Start()
 {
     CHC = GetComponent <CrossHairController>();
 }