private void PlayerPickupDrop(GameObject player) { RobotLoadout playerLo = player.GetComponent <RobotLoadout> (); if (TutorialFunctions.instance) { if (thisItem.itemType == ItemType.range) { TutorialFunctions.instance.DialogueTriggerValue(2); } if (thisItem.itemLoc == ItemLoc.core || thisItem.itemLoc == ItemLoc.back) { TutorialFunctions.instance.DialogueTriggerValue(3); } } if (Database.instance.ArmIsambidextrous(thisItem)) { print("Item can go on either arm."); ItemWheel itemWheel = FindObjectOfType <ItemWheel> (); itemWheel.PickupWeaponWheel(thisItem, this); } else { PerformTheItemSwitch(playerLo); } }
void Start() { myRigidBody = GetComponent <Rigidbody>(); myCamera = GetComponentInChildren <Camera>(); myMovement = GetComponent <MovementScript>(); myMenu = GetComponent <Interactable>(); SetPlayerState(PlayerState.Falling); SetPlayerStance(PlayerStance.Standing); myMovement.SetRunForce(myMovement.RunForce); myInventoryManager = GetComponent <ItemWheel>(); myInventory = GetComponent <EquipmentInventory>(); }
// Use this for initialization void Start() { firingController = this.transform.parent.GetComponentInChildren <FiringController> () as FiringController; aimingController = this.transform.parent.GetComponentInChildren <AimingController>() as AimingController; movementActuator = GetComponentInParent <CharacterMovementActuator> () as CharacterMovementActuator; character = GetComponentInParent <Character> () as Character; hand = this.transform.parent.GetComponentInChildren <Hand> () as Hand; componentData = new CharacterComponentData(character); itemWheel = GetComponentInChildren <ItemWheel> () as ItemWheel; instantiatedDefault = Instantiate(defaultItemPrefab, this.transform.position, Quaternion.identity) as Item; instantiatedDefault.SetItemStateHeld(); EquipItem(instantiatedDefault); inventory = new List <Item>(); AddItemToInventory(instantiatedDefault); }