Пример #1
0
    // Use this for initialization
    void Start()
    {
        if (tc == null) {
            tc = GameObject.Find("Translate").GetComponent<TranslateController>();
        }

        txt = GetComponent<Text> ();
        updateText ();
        tc.registerGO (this);
    }
Пример #2
0
    public MinimalPhysicAgent(GameObject _body, Vector3 _goal, int _index)
    {
        body = _body;
        Controller = body.GetComponent<TranslateController>();
        navMeshAgent = body.GetComponentInChildren<NavMeshAgent>();
        goal = _goal;
        int k = 0;

        navMeshAgent.enabled = false;
        navMeshAgent.enabled = true;
        if (!navMeshAgent.SetDestination (goal)) {
            navMeshAgent.enabled = false;
            navMeshAgent.enabled = true;
            navMeshAgent.SetDestination (goal);
        }

        index = _index;
    }
 public TuringTranslate(TranslateController translateController)
 {
     _translateController = translateController;
 }