private void OnTriggerEnter(Collider other)
    {
        correct              = 0;
        incorrect            = 0;
        interferenceResponse = 0;


        response = gameObject.tag.ToString();

        if (other.gameObject.name.Contains("Item"))
        {
            //만약 item에 glass가 포함된 아이템으로 응답했다면
            if (other.gameObject.name.Contains("Paper"))
            {
                // 맞다면 correct 표시
                correct = 1;
            }
            else
            {
                // 아니라면 incorrect 표시
                incorrect = 1;

                if (other.gameObject.name.Contains("Yellow"))
                {
                    interferenceResponse = 1;
                }
            }

            S2_User_Log.Log("System", "Get", other.gameObject.tag.ToString(), "", "", "", "", response, interferenceResponse.ToString(), "", "", "", incorrect.ToString(), correct.ToString());


            Destroy(other.gameObject, destroyTime);
        }
    }
예제 #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.name.Contains("Item"))
     {
         S2_User_Log.Log("User", "Missed", other.gameObject.tag.ToString(), "", "", "", "", "", "", "", "", "", "1", "");
         Destroy(other.gameObject, destroyTime);
     }
 }
    private void OnTriggerExit(Collider other)
    {
        if (other.gameObject.name.Contains("Item"))
        {
            Debug.Log("--- stop action ---");

            actionTime = tempTime;


            cumulativeRight_ControllorPos = tempRight_ControllorPos;

            cumulativeLeft_ControllorPos = tempLeft_ControllorPos;

            S2_User_Log.Log("User", "Drop", other.gameObject.tag.ToString(), ir_yellowCheck.totHandHesitation.ToString(),
                            ir_blueCheck.totHandHesitation.ToString(), ir_redCheck.totHandHesitation.ToString(),
                            ir_greenCheck.totHandHesitation.ToString(), "", "",
                            cumulativeLeft_ControllorPos.ToString(), cumulativeRight_ControllorPos.ToString(), actionTime.ToString("f3"), "", "");
        }
    }
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.name.Contains("Item"))
        {
            // 데이터 저장했으면 초기화
            tempTime   = 0;
            actionTime = 0;

            ir_blueCheck.totHandHesitation   = 0;
            ir_redCheck.totHandHesitation    = 0;
            ir_yellowCheck.totHandHesitation = 0;
            ir_greenCheck.totHandHesitation  = 0;

            tempRight_ControllorPos       = Vector3.zero;
            tempLeft_ControllorPos        = Vector3.zero;
            cumulativeRight_ControllorPos = Vector3.zero;
            cumulativeLeft_ControllorPos  = Vector3.zero;

            S2_User_Log.Log("User", "Get", other.gameObject.tag.ToString(), "", "", "", "", "", "", "", "", "", "", "");
        }
    }