Inheritance: UnityEngine.MonoBehaviour
Exemplo n.º 1
0
        // Use this for initialization
        void Start()
        {
            _agent = GetComponent<NavMeshAgent>();
            _ai = GetComponent<AiMovement>();
            //    _uiControl = GameObject.FindGameObjectWithTag(Constants.Tags.GameUI).GetComponent<UiController>();

               movementLight = (GameObject)Instantiate(MovementLight, Vector3.zero, Quaternion.identity);
        }
Exemplo n.º 2
0
        // Use this for initialization
        void Start()
        {
            _sideKick = GameObject.FindGameObjectWithTag(Constants.Tags.SideKick);
            _sideKickAgent = _sideKick.GetComponent<NavMeshAgent>();
            _sideKickMovement = _sideKick.GetComponent<AiMovement>();
            _player = GameObject.FindGameObjectWithTag(Constants.Tags.Player);
            _sidekickPickupHandler = _sideKick.GetComponent<PickupHandler>();

            var db = GameObject.FindGameObjectWithTag(Constants.Tags.DatabaseManager);
            if (db != null)
                _dbManager = db.GetComponent<DatabaseManager>();
            else
                Debug.Log("No dbmanager in scene!! - Problem?");
        }