Esempio n. 1
0
        public GameObject en; // tmp

        private void Awake()
        {
            Instance = this;

            MapBuilder = new MapBuilder(FindObjectOfType <MapObjectsManager>(), 40, 40);
            MapBuilder.Generate();

            Player          = GameObject.FindGameObjectWithTag("Player");
            Hand            = GameObject.FindGameObjectWithTag("Hand").transform;
            CameraCurrent   = Camera.main;
            Invertory       = new Invertory();
            ParticleManager = GameObject.FindGameObjectWithTag("ParticleManager").GetComponent <ParticleManager>();

            CameraController = new CameraController(CameraCurrent.transform);
            CameraController.Follow(Player.transform);
            CameraController.On();
            _controllers.Add(CameraController);

            InputController = new InputController();
            InputController.On();
            _controllers.Add(InputController);

            PlayerController = new PlayerController(new UnitMotor(Player.transform));
            PlayerController.On();
            _controllers.Add(PlayerController);

            InHandController = new InHandController();
            InHandController.On();
            _controllers.Add(InHandController);

            FlashlightController = new FlashlightController();
            FlashlightController.Off();
            _controllers.Add(FlashlightController);

            NpcController = new NpcController();
            NpcController.On();
            _controllers.Add(NpcController);
        }