public void Initialize(WeaponHolder weaponHolder, WeaponScriptable weaponScriptable)
        {
            WeaponHolder       = weaponHolder;
            CrosshairComponent = weaponHolder.Crosshair;

            if (weaponScriptable)
            {
                WeaponStats = weaponScriptable.WeaponStats;
            }
        }
示例#2
0
    private void Awake()
    {
        PlayerAnimator   = GetComponent <Animator>();
        PlayerController = GetComponent <PlayerController>();
        if (PlayerController)
        {
            PlayerCrosshair = PlayerController.CrossHair;
        }

        ViewCamera = Camera.main;
    }
示例#3
0
 //public string interactMethod = "Interact";
 // Use this for initialization
 void Start()
 {
     crossHairScript = GetComponent<CrossHairScript>();
 }
示例#4
0
 public void Initialize(WeaponHolder weaponHolder, CrossHairScript crossHair)
 {
     WeaponHolder       = weaponHolder;
     CrosshairComponent = crossHair;
 }
 // Use this for initialization
 void Awake()
 {
     instance = this;
     cam = GameObject.Find("Player").GetComponentInChildren<Camera>();
 }