Пример #1
0
    void ProcessRayCast(ProcessHit processHit)
    {
        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        if (Physics.Raycast(ray, out RaycastHit hit, 100))
        {
            processHit(hit);
        }
    }
Пример #2
0
    // 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();
    }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     hitProcessor = processorObj.GetComponent <ProcessHit>();
 }