Example #1
0
    void Awake()
    {
        Transform mainTransform = gameObject.transform;

        playerCenter        = mainTransform;
        characterController = GetComponent <CharacterController>();
        foreach (Transform transform in mainTransform)
        {
            if (transform.name == "CarryPosition")
            {
                carryPosition = transform;
                break;
            }
        }
        characterDirection   = carryPosition.position - playerCenter.position;
        characterDirection.y = 0;
        abilities            = GetComponents <Ability>();
        interactionAbility   = GetComponent <InteractionAbility>();
        objectDropper        = GetComponent <ObjectDropper>();
        inventory            = new List <Item>();
    }