コード例 #1
0
    void Start()
    {
        _isDead             = false;
        _health             = maxHealth;
        _rb                 = GetComponent <Rigidbody>();
        _keyboardController = new KeyboardController(this, GetComponent <PlayerView>());
        _currentController  = _keyboardController;

        //weapon start, dps vemos q hacemos
        if (weapon1 != null)
        {
            currentWeapon = weapon1;
        }
        if (weapon2 != null)
        {
            weapon2.gameObject.SetActive(false);
        }

        fbClass = GetComponent <ClassChangeFeedback>();
        LoadWeapons();
        fbClass.ChangeFeedback(currentWeapon);

        //delete l8er
        _isPaused = false;
        pauseText.gameObject.SetActive(false);
        healingParticle.gameObject.SetActive(false);
    }
コード例 #2
0
    void Start()
    {
        myLife           = GetComponent <PlayerLife>();
        playerController = GetComponent <PlayerController>();
        fbClass          = GetComponent <ClassChangeFeedback>();
        anim             = GetComponent <Animator>();

        if (weapon1 != null)
        {
            currentWeapon = weapon1;
        }
        if (weapon2 != null)
        {
            weapon2.gameObject.SetActive(false);
        }

        LoadWeapons();
        fbClass.ChangeFeedback(currentWeapon);
    }