using System.Collections; using System.Collections.Generic; using UnityEngine; using HQFPSWeapons; public class scopeBehaviour : MonoBehaviour { public Player player; public CanvasGroup scopeCanvas; public weaponAttachmentsMgr attachmentsMgr; void Start() { player.Aim.AddStartListener(OnAimStart); player.Aim.AddStopListener(OnAimStop); } void Update() { scopeCanvas.alpha = attachmentsMgr.aimed; } void OnAimStart(){ attachmentsMgr.focus(true); } void OnAimStop(){ attachmentsMgr.focus(false); } }