Ejemplo n.º 1
0
    public void Shoot(int AmmoType)
    {
        IsoController.SwitchWeapon(0);
        OnFiringStart?.Invoke();

        BulletPool.Instance.Instantiate(AmmoType, IsoController.transform.position + SpawnBulletOffset, IsometricPlayerMovementController.lastWantedDirection.normalized);
    }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        _uiManager        = UIManager.Instance;
        _objectPooler     = ObjectPooler.Instance;
        _animator         = GetComponent <Animator>();
        _playerController = GetComponent <IsoController>();

        // Set initial fire value
        playerCurrentFire = startingFire;

        // Disable all input
        _playerController.movementEnabled  = false;
        _playerController.mouseLookEnabled = false;
        _playerController.inputDisabled    = true;
    }
Ejemplo n.º 3
0
    public void Vacume(bool value)
    {
        circle.enabled = value;
        if (m_LastVacumValue != value)
        {
            m_LastVacumValue = value;

            if (value)
            {
                IsoController.SwitchWeapon(1);
                OnVacumStart?.Invoke();
                IsoController.SlowDown(value);
            }
            else
            {
                IsoController.SlowDown(value);
                OnVacumEnd?.Invoke();
            }
        }
    }