Пример #1
0
    // Use this for initialization222
    void Start()
    {
        robotVision      = robot.GetComponent <VisionManager>();
        robotSmell       = robot.GetComponent <SmellManager>();
        robotHearing     = robot.GetComponent <HearingManager>();
        robotTaste       = robot.GetComponent <TasteManager>();
        robotTouch       = robot.GetComponent <TouchManager>();
        robotSenses      = GetComponent <SensesManager>();
        locationsOnScene = new List <GameObject>(GameObject.FindGameObjectsWithTag(Constants.TAG_KNOWLOCATIONS));

        animator      = robot.GetComponent <Animator>();
        commandsQueue = new Queue <Command>();
        aI            = robot.GetComponent <AgentInteraction>();
        aM            = robot.GetComponent <AgentMovement>();
        hM            = robot.GetComponent <AgentHeadMovement>();
        sp            = robot.GetComponent <AgentSpeech>();

        locationsList = new List <GameObject>(locationsOnScene);
        Debug.Log("RHS>>> " + this.name + " ready.");
    }
Пример #2
0
    void Start()
    {
        scm        = simulatorManager.GetComponent <SimulatorCommandsManager>();
        sm         = simulatorManager.GetComponent <SensesManager>();
        vision     = scm.robot.GetComponent <VisionManager>();
        smell      = scm.robot.GetComponent <SmellManager>();
        hearing    = scm.robot.GetComponent <HearingManager>();
        taste      = scm.robot.GetComponent <TasteManager>();
        touch      = scm.robot.GetComponent <TouchManager>();
        robotHProp = scm.robot.GetComponent <HearingProperties>();

        uid = scm.GetComponent <UniqueIdDistributor>();

        height           = robotCamera.pixelHeight;
        width            = robotCamera.pixelWidth;
        textVision       = visionComponent.GetComponent <Text>();
        textSmell        = smellComponent.GetComponent <Text>();
        textHearing      = hearingComponent.GetComponent <Text>();
        textTaste        = tasteComponent.GetComponent <Text>();
        textTouch        = touchComponent.GetComponent <Text>();
        textSpeech       = speechComponent.GetComponent <Text>();
        commandTextField = statusPanel.Find("CommandText").GetComponent <Text>();
        statusTextField  = statusPanel.Find("StatusText").GetComponent <Text>();
        textTaste.text   = "";
        textVision.text  = "";
        textSmell.text   = "";
        textHearing.text = "";
        textTouch.text   = "";
        textSpeech.text  = "";

        if (timePanel != null)
        {
            playButton  = timePanel.Find("PlayButton").GetComponent <UnityEngine.UI.Button>();
            pauseButton = timePanel.Find("PauseButton").GetComponent <UnityEngine.UI.Button>();
            stopButton  = timePanel.Find("StopButton").GetComponent <UnityEngine.UI.Button>();
            //stopButton.interactable = false;
            pauseSimulation();
        }
        Debug.Log("RHS>>> " + this.name + " is ready.");
    }