public PlayerStaminaEventArgs(StaminaComponent p)
 {
     Stamina             = p.Stamina;
     MaxStamina          = p.MaxStamina;
     sGuiRawData         = p.sGuiRawData;
     IsStaminaExtVisible = p.IsStaminaExtVisible;
     SelectedItemId      = p.SelectedItemId;
     MaxPossibleStamina  = p.MaxPossibleStamina;
 }
    void Awake()
    {
        Cursor.lockState = CursorLockMode.Locked;

        m_CanInteract      = true;
        m_PlayerAnim       = GetComponentInChildren <Animator>();
        m_Controller       = GetComponent <CharacterController>();
        m_PlayerGliding    = GetComponent <Gliding>();
        m_PlayerWalking    = GetComponent <Walking>();
        m_StaminaComponent = GetComponent <StaminaComponent>();
        m_HookPosDetection = GetComponent <HookPosDetection>();

        // Permet de conserver en mémoire les materials originels des vêtements
        m_ClothSavedMaterial = m_Cloth.materials[0];
        m_PagneSavedMaterial = m_Pagne.materials[0];
    }
    private void Awake()
    {
        // speedLinesParticleSystem = transform.Find("Camera").Find("SpeedLinesParticleSystem").GetComponent<ParticleSystem>();
        Cursor.lockState = CursorLockMode.Locked;

        m_State = State.Normal;

        m_HookShotOrigin.gameObject.SetActive(false);
        m_HookPosDetection  = GetComponent <HookPosDetection>();
        m_PlayerGliding     = GetComponent <Gliding>();
        m_PlayerWalking     = GetComponent <Walking>();
        m_PlayerWallGliding = GetComponent <WallGliding>();
        m_PlayerAnim        = GetComponentInChildren <Animator>();
        m_StaminaComponent  = GetComponent <StaminaComponent>();
        //for (int i = 0; i < m_Cloth.Length; i++)
        //{
        //    m_SavedMaterial[i] = m_Cloth[i].materials[0];
        //}
        m_ClothSavedMaterial = m_Cloth.materials[0];
        m_PagneSavedMaterial = m_Pagne.materials[0];
        // m_HookLine = m_HookShotOrigin.GetComponent<LineRenderer>();
        // Debug.Log(CinemachineComponent.m_Lens.FieldOfView);
    }
示例#4
0
 private void Start()
 {
     m_StaminaComponent = FindObjectOfType <StaminaComponent>();
     SetStamina(m_StaminaComponent.CurrentStamina);
 }