Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        controller            = GetComponent <Controller2D>();
        hitbox                = GetComponent <Hitbox>();
        hitbox.onDamageTaken += OnDamageTaken;

        lightAttack = GetComponent <MeleeAttackAgent>();
        lightAttack.Init(enemyCollisionMask, controller.collisionMask);

        heavyAttack = GetComponent <ExtendedAttackAgent>();
        heavyAttack.Init(enemyCollisionMask, controller.collisionMask);

        RecalculateMovementSettings();
    }