Exemple #1
0
        void Start()
        {
            //Setup Input
            inputManager = new PlayerInputManager(
                new PlayerInputBindings(),
                new MouseFollowInputHandler(Camera.main)
                );

            //Setup Shooting
            ObjectPool pool = new ObjectPool(Resources.Load <GameObject>("projectile"), 20, true);

            shootAbility = new ShootAbility(transform, pool);
            inputManager.AddActionToBinding("shoot", OnShoot);

            //Start Audio System
            audioManager = new AudioManager();
            AudioSource source = GetComponent <AudioSource>();

            audioManager.AddAudioSource("SFX", source);
        }