void ProcessRayCast(ProcessHit processHit) { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ray, out RaycastHit hit, 100)) { processHit(hit); } }
// Start is called before the first frame update void Start() { objRenderer = meshObj.GetComponent <Renderer>(); objMaterials = objRenderer.materials; hitProcessor = GetComponent <ProcessHit>(); petProcessor = GetComponent <ProcessPet>(); liftProcessor = GetComponent <ProcessLift>(); grabProcessor = GetComponent <ProcessGrab>(); beckonProcessor = GetComponent <ProcessBeckon>(); currentState = State.Neutral; previousState = currentState; updateState(); updateExpression(); }
// Start is called before the first frame update void Start() { hitProcessor = processorObj.GetComponent <ProcessHit>(); }