コード例 #1
0
    // 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;
    }
コード例 #2
0
 private void Awake()
 {
     inConversation  = false;
     rb              = GetComponent <Rigidbody>();
     nearbyNpcs      = new Collider[1];
     pressedInteract = false;
     body            = GetComponent <CharacterBodyCostumization>();
 }
コード例 #3
0
ファイル: Inventory.cs プロジェクト: looki666/SoulsLike
 // 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;
     }
 }
コード例 #4
0
    // 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];
    }
コード例 #5
0
 public void Equip(CharacterBodyCostumization body)
 {
     body.TorsoPart = this;
 }
コード例 #6
0
 public void ArmsAddedToBody(CharacterBodyCostumization body)
 {
     this.body = body;
 }