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; }
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; }
// 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>(); }
// Use this for initialization void Start() { status_script = this.GetComponent <player_status>(); inventory = GetComponent <inventory>(); }
void Awake() { player = p.GetComponent <player_status>(); }
void Start() { inventoryUI = InventoryUI.instance; handSlot = HandSlot.instance; status_script = this.GetComponent <player_status>(); }
void Start() { status_script = this.GetComponent <player_status>(); }