// Use this for initialization void Start() { becameGrounded = false; isSprinting = false; isCrouching = false; dodge = false; isDodging = false; isLocked = false; pressedLocking = false; jump = false; closestEnemy = null; nearbyEnemies = new Collider[5]; myCamera = GetComponentInChildren <CameraController>(); bodyParts = GetComponent <CharacterBodyCostumization>(); if (bodyParts.ArmsPart != null) { animator = bodyParts.ArmsPart.animator; } rb = GetComponent <Rigidbody>(); col = GetComponent <CapsuleCollider>(); originalColliderCenter = col.center; kinMotor = GetComponent <KinematicMotor>(); kinMotor.LayerMaskCollision = layerMaskCollision; }
private void Awake() { inConversation = false; rb = GetComponent <Rigidbody>(); nearbyNpcs = new Collider[1]; pressedInteract = false; body = GetComponent <CharacterBodyCostumization>(); }
// Use this for initialization void Awake() { items = new Dictionary <int, GameObject>(); instanciatedItems = new Dictionary <int, GameObject>(); body = GetComponent <CharacterBodyCostumization>(); if (inventoryUI != null) { inventoryUI.Inventory = this; } }
// Use this for initialization void Start() { isSlopeSliding = false; becameGrounded = false; isGrounded = false; isJumping = false; isSprinting = false; isCrouching = false; jump = false; gravitySpeed = GRAVITY * fallSpeed; boxColliderDimensions = new Vector3(2 / 3f, 1f, 2 / 3f); animator = GetComponent <Animator>(); bodyParts = GetComponent <CharacterBodyCostumization>(); rb = GetComponent <Rigidbody>(); col = GetComponent <Collider>(); nearbyColliders = new Collider[16]; }
public void Equip(CharacterBodyCostumization body) { body.TorsoPart = this; }
public void ArmsAddedToBody(CharacterBodyCostumization body) { this.body = body; }