Exemple #1
0
 void Start()
 {
     inventoryUI           = InventoryUI.instance;
     handSlot              = HandSlot.instance;
     status_script         = this.GetComponent <player_status>();
     inventory_script      = this.GetComponent <inventory>();
     fartherOrCloserFactor = 1.0f;
     itemPlaced            = 0;
     itemExist             = 0;
 }
Exemple #2
0
    void Start()
    {
        // Instantiate references
        Cursor.lockState = CursorLockMode.Locked;
        Cursor.visible   = false;

        inv = inventory.instance;
        // When inventory changes, add an update request to UI
        inv.onItemChangedCallback += UpdateUI;

        handSlot = HandSlot.instance;
        // Set slots to children of the parent class
        slots = itemsParent.GetComponentsInChildren <InventorySlot>();

        player_situation = player.GetComponent <player_status>();

        UIActive = false;
    }
Exemple #3
0
        // Use this for initialization
        // Private debug

        private void Start()
        {
            m_CharacterController = GetComponent <CharacterController>();
            m_jumpAngleLimit      = 90 - m_CharacterController.slopeLimit;
            m_Camera = Camera.main;
            m_OriginalCameraPosition = m_Camera.transform.localPosition;
            m_FovKick.Setup(m_Camera);
            m_HeadBob.Setup(m_Camera, m_StepInterval);
            m_StepCycle   = 0f;
            m_NextStep    = m_StepCycle / 2f;
            m_Jumping     = false;
            m_AudioSource = GetComponent <AudioSource>();
            m_MouseLook.Init(transform, m_Camera.transform);
            default_jump_duration = m_JumpBob.BobDuration;
            default_jump_amount   = m_JumpBob.BobAmount;
            rotateCamera          = true;
            playerStatus          = GetComponent <player_status>();
        }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     status_script = this.GetComponent <player_status>();
     inventory     = GetComponent <inventory>();
 }
Exemple #5
0
 void Awake()
 {
     player = p.GetComponent <player_status>();
 }
Exemple #6
0
 void Start()
 {
     inventoryUI   = InventoryUI.instance;
     handSlot      = HandSlot.instance;
     status_script = this.GetComponent <player_status>();
 }
Exemple #7
0
 void Start()
 {
     status_script = this.GetComponent <player_status>();
 }