Beispiel #1
0
    private void insertHearPos(GameObject go, DateTime dt)
    {
        CartesianPos      cPos = new CartesianPos(go.transform.position.x, go.transform.position.y, go.transform.position.z);
        HearingProperties auxHearingProperties = go.GetComponent <HearingProperties>();
        HearingAttribute  soundType            = HearingAttribute.unknownSound;
        float             volume = 0;
        string            desc   = "";

        if (auxHearingProperties != null)
        {
            soundType = auxHearingProperties.getSoundType();
            volume    = auxHearingProperties.getVolume();
            desc      = auxHearingProperties.getSoundDetail();
        }
        RobotHear rh = new RobotHear(
            dt,                     // the event occurs now
            cPos,                   // object  identifier
            soundType,              // I heard a beautiful music
            volume,                 // the volume is in the middle
            desc);                  // sound detail

        try                         // Try to access a resource.
        {
            rh.insert();            // using dotNetRDF library inserts the information in the triple store
        }
        catch (Exception e)
        {
            Debug.Log("System>>> " + e.Message);                  // change for your: LogError(e);     // Call a custom error logging procedure.
        }
    }
Beispiel #2
0
    void Update()
    {
        //dropObjects.options.Clear();
        textVision.text  = sm.getStringVisionInformation();
        textSmell.text   = sm.getStringSmellInformation();
        textHearing.text = sm.getStringHearInformation();
        textTaste.text   = sm.getStringTasteInformation();
        textTouch.text   = sm.getStringTouchInformation();
        textSpeech.text  = robotHProp.getSoundDetail();
        Toggle auxSmellParToogle = groupToggleSmellParticles.GetActive();

        sensesPanel.gameObject.active = groupToggleSensesPanel.GetActive();
        if (auxSmellParToogle != null && auxSmellParToogle.gameObject.name.Equals(Constants.TGGL_SMLLPON))
        {
            activateSmellParticles(true);
        }
        else
        {
            activateSmellParticles(false);
        }

        if (scm != null)
        {
            commandTextField.text = scm.getAtCommandName();
            CommandStatus commandStatus = scm.getCurrentCommandStatus();
            statusTextField.text = commandStatus.ToString();
            switch (commandStatus)
            {
            case CommandStatus.Success:
                statusPanel.GetComponent <Image>().color = successColor;
                break;

            case CommandStatus.Running:
                statusPanel.GetComponent <Image>().color = runningColor;
                break;

            case CommandStatus.Fail:
                statusPanel.GetComponent <Image>().color = failColor;
                break;

            default:
                break;
            }
        }
    }